summaryrefslogtreecommitdiff
path: root/mount.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>1999-11-10 23:13:02 +0000
committerEric Andersen <andersen@codepoet.org>1999-11-10 23:13:02 +0000
commitd73dc5b07390fb90e7f605871c993a28eedf1d46 (patch)
tree3e448e6550da52d2709e5f52fbae56e9df9462cc /mount.c
parent84d85680712573c7a8bd7d0491c3f944dc08ad10 (diff)
downloadbusybox-w32-d73dc5b07390fb90e7f605871c993a28eedf1d46.tar.gz
busybox-w32-d73dc5b07390fb90e7f605871c993a28eedf1d46.tar.bz2
busybox-w32-d73dc5b07390fb90e7f605871c993a28eedf1d46.zip
Updates to usage, and made tar work.
-Erik
Diffstat (limited to 'mount.c')
-rw-r--r--mount.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/mount.c b/mount.c
index 4c085d01b..827a56f0a 100644
--- a/mount.c
+++ b/mount.c
@@ -43,7 +43,7 @@
43 43
44extern const char mtab_file[]; /* Defined in utility.c */ 44extern const char mtab_file[]; /* Defined in utility.c */
45 45
46static const char mount_usage[] = "Usage:\tmount [flags]\n" 46static const char mount_usage[] = "\tmount [flags]\n"
47 "\tmount [flags] device directory [-o options,more-options]\n" 47 "\tmount [flags] device directory [-o options,more-options]\n"
48 "\n" 48 "\n"
49 "Flags:\n" 49 "Flags:\n"
@@ -248,8 +248,7 @@ extern int mount_main (int argc, char **argv)
248 while (i>0 && *++(*argv)) switch (**argv) { 248 while (i>0 && *++(*argv)) switch (**argv) {
249 case 'o': 249 case 'o':
250 if (--i == 0) { 250 if (--i == 0) {
251 fprintf (stderr, "%s\n", mount_usage); 251 goto goodbye;
252 exit( FALSE);
253 } 252 }
254 parse_mount_options (*(++argv), &flags, string_flags); 253 parse_mount_options (*(++argv), &flags, string_flags);
255 --i; 254 --i;
@@ -260,8 +259,7 @@ extern int mount_main (int argc, char **argv)
260 break; 259 break;
261 case 't': 260 case 't':
262 if (--i == 0) { 261 if (--i == 0) {
263 fprintf (stderr, "%s\n", mount_usage); 262 goto goodbye;
264 exit( FALSE);
265 } 263 }
266 filesystemType = *(++argv); 264 filesystemType = *(++argv);
267 --i; 265 --i;
@@ -284,9 +282,7 @@ extern int mount_main (int argc, char **argv)
284 case 'v': 282 case 'v':
285 case 'h': 283 case 'h':
286 case '-': 284 case '-':
287 fprintf (stderr, "%s\n", mount_usage); 285 goto goodbye;
288 exit( TRUE);
289 break;
290 } 286 }
291 } else { 287 } else {
292 if (device == NULL) 288 if (device == NULL)
@@ -294,8 +290,7 @@ extern int mount_main (int argc, char **argv)
294 else if (directory == NULL) 290 else if (directory == NULL)
295 directory=*argv; 291 directory=*argv;
296 else { 292 else {
297 fprintf (stderr, "%s\n", mount_usage); 293 goto goodbye;
298 exit( TRUE);
299 } 294 }
300 } 295 }
301 i--; 296 i--;
@@ -331,9 +326,11 @@ extern int mount_main (int argc, char **argv)
331 exit (mount_one (device, directory, filesystemType, 326 exit (mount_one (device, directory, filesystemType,
332 flags, string_flags, useMtab, fakeIt)); 327 flags, string_flags, useMtab, fakeIt));
333 } else { 328 } else {
334 fprintf (stderr, "%s\n", mount_usage); 329 goto goodbye;
335 exit( FALSE);
336 } 330 }
337 } 331 }
338 exit( TRUE); 332 exit( TRUE);
333
334goodbye:
335 usage( mount_usage);
339} 336}