Ignore:
Timestamp:
2017-12-20T22:25:34Z (6 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
39b54fe
Parents:
8610c2c
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-20 22:22:29)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-20 22:25:34)
Message:

"Obviously harmless" error handling tweaks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bdsh/cmds/modules/mkdir/mkdir.c

    r8610c2c rd5c1051  
    9494
    9595        int ret = 0;
     96        int rc;
    9697
    9798        if (!create_parents) {
    98                 ret = vfs_link_path(path, KIND_DIRECTORY, NULL);
    99                 if (ret != EOK) {
     99                rc = vfs_link_path(path, KIND_DIRECTORY, NULL);
     100                if (rc != EOK) {
    100101                        cli_error(CL_EFAIL, "%s: could not create %s (%s)",
    101                             cmdname, path, str_error(ret));
     102                            cmdname, path, str_error(rc));
    102103                        ret = 1;
    103104                }
     
    135136                        path[prev_off] = 0;
    136137
    137                         ret = vfs_link_path(path, KIND_DIRECTORY, NULL);
    138                         if (ret != EOK && ret != EEXIST) {
     138                        rc = vfs_link_path(path, KIND_DIRECTORY, NULL);
     139                        if (rc != EOK && rc != EEXIST) {
    139140                                cli_error(CL_EFAIL, "%s: could not create %s (%s)",
    140                                     cmdname, path, str_error(ret));
     141                                    cmdname, path, str_error(rc));
    141142                                ret = 1;
    142143                                goto leave;
     
    146147                }
    147148                /* Create the final directory. */
    148                 ret = vfs_link_path(path, KIND_DIRECTORY, NULL);
    149                 if (ret != EOK) {
     149                rc = vfs_link_path(path, KIND_DIRECTORY, NULL);
     150                if (rc != EOK) {
    150151                        cli_error(CL_EFAIL, "%s: could not create %s (%s)",
    151                             cmdname, path, str_error(ret));
     152                            cmdname, path, str_error(rc));
    152153                        ret = 1;
    153154                }
Note: See TracChangeset for help on using the changeset viewer.