Changeset cfc3027 in mainline
- Timestamp:
- 2011-04-01T14:23:08Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- bdbb6f6
- Parents:
- 2859445
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/cmds/modules/ls/ls.c
r2859445 rcfc3027 57 57 /** Structure to represent a directory entry. 58 58 * 59 * Useful to keep together important information s59 * Useful to keep together important information 60 60 * for sorting directory entries. 61 61 */ … … 69 69 static struct option const long_options[] = { 70 70 { "help", no_argument, 0, 'h' }, 71 { "unsort", no_argument, 0, 'u' }, 71 { "unsort", no_argument, 0, 'u' }, 72 72 { 0, 0, 0, 0 } 73 73 }; … … 246 246 } 247 247 248 int dir = (int) argc > optind ? (int) argc - 1 : optind - 1; 249 argc -= (optind - 1); 248 argc -= optind; 250 249 251 250 de.name = (char *) malloc(PATH_MAX); … … 256 255 memset(de.name, 0, sizeof(PATH_MAX)); 257 256 258 if (argc == 1)257 if (argc == 0) 259 258 getcwd(de.name, PATH_MAX); 260 259 else 261 str_cpy(de.name, PATH_MAX, argv[ dir]);260 str_cpy(de.name, PATH_MAX, argv[optind]); 262 261 263 262 if (stat(de.name, &de.s)) {
Note:
See TracChangeset
for help on using the changeset viewer.