Changeset 6e5562a in mainline for uspace/app/bdsh/cmds/modules/mkdir/mkdir.c
- Timestamp:
- 2017-03-31T19:57:38Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 80743a1
- Parents:
- a56cef9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/cmds/modules/mkdir/mkdir.c
ra56cef9 r6e5562a 32 32 #include <fcntl.h> 33 33 #include <sys/types.h> 34 #include <sys/stat.h>35 34 #include <getopt.h> 36 35 #include <stdarg.h> … … 98 97 99 98 if (!create_parents) { 100 if (mkdir(path, 0) != 0) { 99 ret = vfs_link_path(path, KIND_DIRECTORY); 100 if (ret != EOK) { 101 101 cli_error(CL_EFAIL, "%s: could not create %s (%s)", 102 cmdname, path, str_error( errno));102 cmdname, path, str_error(ret)); 103 103 ret = 1; 104 104 } … … 136 136 path[prev_off] = 0; 137 137 138 if (mkdir(path, 0) != 0 && errno != EEXIST) { 138 ret = vfs_link_path(path, KIND_DIRECTORY); 139 if (ret != EOK && ret != EEXIST) { 139 140 cli_error(CL_EFAIL, "%s: could not create %s (%s)", 140 cmdname, path, str_error( errno));141 cmdname, path, str_error(ret)); 141 142 ret = 1; 142 143 goto leave; … … 146 147 } 147 148 /* Create the final directory. */ 148 if (mkdir(path, 0) != 0) { 149 ret = vfs_link_path(path, KIND_DIRECTORY); 150 if (ret != EOK) { 149 151 cli_error(CL_EFAIL, "%s: could not create %s (%s)", 150 cmdname, path, str_error( errno));152 cmdname, path, str_error(ret)); 151 153 ret = 1; 152 154 }
Note:
See TracChangeset
for help on using the changeset viewer.