diff options
| author | erik <erik@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2000-04-17 16:16:10 +0000 |
|---|---|---|
| committer | erik <erik@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2000-04-17 16:16:10 +0000 |
| commit | d53cc65a1205f2a1b5a9706441504a993a06aa8f (patch) | |
| tree | afe963cde5e3882b8785c963d7d1ec07d458a85a /miscutils | |
| parent | 20d662d561d8d642b825bb00c77638af010cf690 (diff) | |
| download | busybox-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.c | 16 |
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 | ||
| 37 | static char update_usage[] = | 37 | static 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 | ||
| 43 | static unsigned int sync_duration = 30; | 45 | static unsigned int sync_duration = 30; |
| 44 | static unsigned int flush_duration = 5; | 46 | static 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 | /* |
