Changeset b00255a in mainline
- Timestamp:
- 2012-05-04T11:40:50Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 738b549
- Parents:
- 35a35651
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/cmds/modules/mkdir/mkdir.c
r35a35651 rb00255a 83 83 /* This is kind of clunky, but effective for now */ 84 84 static unsigned int 85 create_directory(const char *path, unsigned int p)85 create_directory(const char *path, bool create_parents) 86 86 { 87 87 DIR *dirp; … … 107 107 108 108 /* Typical use without specifying the creation of parents */ 109 if ( p == 0) {109 if (!create_parents) { 110 110 dirp = opendir(tmp); 111 111 if (dirp) { … … 182 182 int cmd_mkdir(char **argv) 183 183 { 184 unsigned int argc, create_parents = 0, i, ret = 0, follow= 0;185 unsigned int verbose = 0;184 unsigned int argc, i, ret = 0; 185 bool create_parents = false, follow = false, verbose = false; 186 186 int c, opt_ind; 187 187 char *cwd; … … 193 193 switch (c) { 194 194 case 'p': 195 create_parents = 1;195 create_parents = true; 196 196 break; 197 197 case 'v': 198 verbose = 1;198 verbose = true; 199 199 break; 200 200 case 'h': … … 205 205 return CMD_SUCCESS; 206 206 case 'f': 207 follow = 1;207 follow = true; 208 208 break; 209 209 case 'm': … … 230 230 231 231 for (i = optind; argv[i] != NULL; i++) { 232 if (verbose == 1)232 if (verbose) 233 233 printf("%s: creating %s%s\n", 234 234 cmdname, argv[i], … … 237 237 } 238 238 239 if (follow == 0)239 if (follow) 240 240 chdir(cwd); 241 241
Note:
See TracChangeset
for help on using the changeset viewer.