aboutsummaryrefslogtreecommitdiff
path: root/miscutils
diff options
context:
space:
mode:
authorerik <erik@69ca8d6d-28ef-0310-b511-8ec308f3f277>2000-04-17 16:16:10 +0000
committererik <erik@69ca8d6d-28ef-0310-b511-8ec308f3f277>2000-04-17 16:16:10 +0000
commitd53cc65a1205f2a1b5a9706441504a993a06aa8f (patch)
treeafe963cde5e3882b8785c963d7d1ec07d458a85a /miscutils
parent20d662d561d8d642b825bb00c77638af010cf690 (diff)
downloadbusybox-w32-d53cc65a1205f2a1b5a9706441504a993a06aa8f.tar.gz
busybox-w32-d53cc65a1205f2a1b5a9706441504a993a06aa8f.tar.bz2
busybox-w32-d53cc65a1205f2a1b5a9706441504a993a06aa8f.zip
More updates to the docs, and fixes to sync things with the docs.
-Erik git-svn-id: svn://busybox.net/trunk/busybox@467 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'miscutils')
-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/*