aboutsummaryrefslogtreecommitdiff
path: root/miscutils/update.c
diff options
context:
space:
mode:
authorErik Andersen <andersen@codepoet.org>2000-04-17 16:16:10 +0000
committerErik Andersen <andersen@codepoet.org>2000-04-17 16:16:10 +0000
commite5b6c7dd9cb32852a7f5b19a9855cf3c32543396 (patch)
treeafe963cde5e3882b8785c963d7d1ec07d458a85a /miscutils/update.c
parent4fd10fc73be4ce707c7d55f608d47894a2d1b12c (diff)
downloadbusybox-w32-e5b6c7dd9cb32852a7f5b19a9855cf3c32543396.tar.gz
busybox-w32-e5b6c7dd9cb32852a7f5b19a9855cf3c32543396.tar.bz2
busybox-w32-e5b6c7dd9cb32852a7f5b19a9855cf3c32543396.zip
More updates to the docs, and fixes to sync things with the docs.
-Erik
Diffstat (limited to 'miscutils/update.c')
-rw-r--r--miscutils/update.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/miscutils/update.c b/miscutils/update.c
index bb77c5f1f..1e3e032fd 100644
--- a/miscutils/update.c
+++ b/miscutils/update.c
@@ -35,10 +35,12 @@ _syscall2(int, bdflush, int, func, int, data);
35#endif /* __GLIBC__ */ 35#endif /* __GLIBC__ */
36 36
37static char update_usage[] = 37static char update_usage[] =
38 "update [options]\n" 38 "update [options]\n\n"
39 " -S\tforce use of sync(2) instead of flushing\n" 39 "Periodically flushes filesystem buffers.\n\n"
40 " -s SECS\tcall sync this often (default 30)\n" 40 "Options:\n"
41 " -f SECS\tflush some buffers this often (default 5)\n"; 41 "\t-S\tforce use of sync(2) instead of flushing\n"
42 "\t-s SECS\tcall sync this often (default 30)\n"
43 "\t-f SECS\tflush some buffers this often (default 5)\n";
42 44
43static unsigned int sync_duration = 30; 45static unsigned int sync_duration = 30;
44static unsigned int flush_duration = 5; 46static unsigned int flush_duration = 5;
@@ -48,6 +50,8 @@ extern int update_main(int argc, char **argv)
48{ 50{
49 int pid; 51 int pid;
50 52
53 argc--;
54 argv++;
51 while (**argv == '-') { 55 while (**argv == '-') {
52 while (*++(*argv)) { 56 while (*++(*argv)) {
53 switch (**argv) { 57 switch (**argv) {
@@ -62,6 +66,8 @@ extern int update_main(int argc, char **argv)
62 if (--argc < 1) usage(update_usage); 66 if (--argc < 1) usage(update_usage);
63 flush_duration = atoi(*(++argv)); 67 flush_duration = atoi(*(++argv));
64 break; 68 break;
69 default:
70 usage(update_usage);
65 } 71 }
66 } 72 }
67 argc--; 73 argc--;
@@ -100,7 +106,7 @@ extern int update_main(int argc, char **argv)
100 } 106 }
101 } 107 }
102 } 108 }
103 return TRUE; 109 exit( TRUE);
104} 110}
105 111
106/* 112/*