Changeset 9245413 in mainline
- Timestamp:
- 2010-01-09T22:01:53Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 234e39e, 65737d4
- Parents:
- 08232ee
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/mkfat/mkfat.c
r08232ee r9245413 77 77 } fat_params_t; 78 78 79 static void syntax_print(void); 80 79 81 static int fat_params_compute(struct fat_cfg const *cfg, 80 82 struct fat_params *par); … … 100 102 101 103 if (argc < 2) { 102 printf(NAME ": Bad syntax.\n"); 104 printf(NAME ": Error, argument missing.\n"); 105 syntax_print(); 103 106 return 1; 104 107 } … … 109 112 --argc; ++argv; 110 113 if (*argv == NULL) { 111 printf(NAME ": Bad syntax.\n"); 114 printf(NAME ": Error, argument missing.\n"); 115 syntax_print(); 112 116 return 1; 113 117 } … … 115 119 cfg.total_sectors = strtol(*argv, &endptr, 10); 116 120 if (*endptr != '\0') { 117 printf(NAME ": Bad syntax.\n"); 121 printf(NAME ": Error, invalid argument.\n"); 122 syntax_print(); 118 123 return 1; 119 124 } … … 123 128 124 129 if (argc != 1) { 125 printf(NAME ": Bad syntax.\n"); 130 printf(NAME ": Error, unexpected argument.\n"); 131 syntax_print(); 126 132 return 1; 127 133 } … … 131 137 rc = devmap_device_get_handle(dev_path, &handle, 0); 132 138 if (rc != EOK) { 133 printf(NAME ": Error resolving device `%s'.\n", argv[1]);139 printf(NAME ": Error resolving device `%s'.\n", dev_path); 134 140 return 2; 135 141 } … … 183 189 184 190 return 0; 191 } 192 193 static void syntax_print(void) 194 { 195 printf("syntax: mkfat [--size <num_blocks>] <device_name>\n"); 185 196 } 186 197
Note:
See TracChangeset
for help on using the changeset viewer.