aboutsummaryrefslogtreecommitdiff
path: root/miscutils/update.c
diff options
context:
space:
mode:
authorErik Andersen <andersen@codepoet.org>2000-02-08 19:58:47 +0000
committerErik Andersen <andersen@codepoet.org>2000-02-08 19:58:47 +0000
commite49d5ecbbe51718fa925b6890a735e5937cc2aa2 (patch)
treec90bda10731ad9333ce3b404f993354c9fc104b8 /miscutils/update.c
parentc0bf817bbc5c7867fbe8fb76d5c39f8ee802692f (diff)
downloadbusybox-w32-e49d5ecbbe51718fa925b6890a735e5937cc2aa2.tar.gz
busybox-w32-e49d5ecbbe51718fa925b6890a735e5937cc2aa2.tar.bz2
busybox-w32-e49d5ecbbe51718fa925b6890a735e5937cc2aa2.zip
Some formatting updates (ran the code through indent)
-Erik
Diffstat (limited to 'miscutils/update.c')
-rw-r--r--miscutils/update.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/miscutils/update.c b/miscutils/update.c
index 5a7c755ff..fef188bba 100644
--- a/miscutils/update.c
+++ b/miscutils/update.c
@@ -1,3 +1,4 @@
1/* vi: set sw=4 ts=4: */
1/* 2/*
2 * Mini update implementation for busybox 3 * Mini update implementation for busybox
3 * 4 *
@@ -27,20 +28,19 @@
27#include <sys/kdaemon.h> 28#include <sys/kdaemon.h>
28#else 29#else
29_syscall2(int, bdflush, int, func, int, data); 30_syscall2(int, bdflush, int, func, int, data);
30#endif /* __GLIBC__ */ 31#endif /* __GLIBC__ */
31 32
32extern int 33extern int update_main(int argc, char **argv)
33update_main(int argc, char** argv)
34{ 34{
35 /* 35 /*
36 * Update is actually two daemons, bdflush and update. 36 * Update is actually two daemons, bdflush and update.
37 */ 37 */
38 int pid; 38 int pid;
39 39
40 pid = fork(); 40 pid = fork();
41 if ( pid < 0 ) 41 if (pid < 0)
42 return pid; 42 return pid;
43 else if ( pid == 0 ) { 43 else if (pid == 0) {
44 /* 44 /*
45 * This is no longer necessary since 1.3.5x, but it will harmlessly 45 * This is no longer necessary since 1.3.5x, but it will harmlessly
46 * exit if that is the case. 46 * exit if that is the case.
@@ -52,11 +52,11 @@ update_main(int argc, char** argv)
52 _exit(0); 52 _exit(0);
53 } 53 }
54 pid = fork(); 54 pid = fork();
55 if ( pid < 0 ) 55 if (pid < 0)
56 return pid; 56 return pid;
57 else if ( pid == 0 ) { 57 else if (pid == 0) {
58 argv[0] = "update"; 58 argv[0] = "update";
59 for ( ; ; ) { 59 for (;;) {
60 sync(); 60 sync();
61 sleep(30); 61 sleep(30);
62 } 62 }