summaryrefslogtreecommitdiffhomepage
path: root/runit
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-01-11 17:20:00 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-01-11 17:20:00 +0000
commitf7996f3b700a22797565e9aa57e251e6e3ac1e4d (patch)
treeaf4e797eef0a65f4e3dba94b325da0ec08452d36 /runit
parent3821fb13ea404d243115ff8ec161273b62826513 (diff)
Trailing whitespace removal over entire tree
Diffstat (limited to 'runit')
-rw-r--r--runit/chpst.c2
-rw-r--r--runit/runit_lib.c12
-rw-r--r--runit/runsv.c6
-rw-r--r--runit/runsvdir.c8
-rw-r--r--runit/sv.c2
-rw-r--r--runit/svlogd.c8
6 files changed, 19 insertions, 19 deletions
diff --git a/runit/chpst.c b/runit/chpst.c
index 14b8b5a15..4662a4a83 100644
--- a/runit/chpst.c
+++ b/runit/chpst.c
@@ -290,7 +290,7 @@ int chpst_main(int argc, char **argv)
}
argv += optind;
if (!argv || !*argv) bb_show_usage();
-
+
if (OPT_pgrp) setsid();
if (env_dir) edir(env_dir);
if (root) {
diff --git a/runit/runit_lib.c b/runit/runit_lib.c
index 8612a1b94..b885a3412 100644
--- a/runit/runit_lib.c
+++ b/runit/runit_lib.c
@@ -84,7 +84,7 @@ int buffer_feed(buffer *s)
int buffer_bget(buffer *s,char *buf,unsigned len)
{
int r;
-
+
if (s->p > 0) return getthis(s,buf,len);
if (s->n <= len) return oneread(s->op,s->fd,buf,s->n);
r = buffer_feed(s); if (r <= 0) return r;
@@ -94,7 +94,7 @@ int buffer_bget(buffer *s,char *buf,unsigned len)
int buffer_get(buffer *s,char *buf,unsigned len)
{
int r;
-
+
if (s->p > 0) return getthis(s,buf,len);
if (s->n <= len) return oneread(s->op,s->fd,buf,len);
r = buffer_feed(s); if (r <= 0) return r;
@@ -135,7 +135,7 @@ static int allwrite(int (*op)(int fd,char *buf,unsigned len),int fd,const char *
int buffer_flush(buffer *s)
{
int p;
-
+
p = s->p;
if (!p) return 0;
s->p = 0;
@@ -145,7 +145,7 @@ int buffer_flush(buffer *s)
int buffer_putalign(buffer *s,const char *buf,unsigned len)
{
unsigned n;
-
+
while (len > (n = s->n - s->p)) {
memcpy(s->x + s->p,buf,n);
s->p += n;
@@ -162,7 +162,7 @@ int buffer_putalign(buffer *s,const char *buf,unsigned len)
int buffer_put(buffer *s,const char *buf,unsigned len)
{
unsigned n;
-
+
n = s->n;
if (len > n - s->p) {
if (buffer_flush(s) == -1) return -1;
@@ -487,7 +487,7 @@ void taia_sub(struct taia *t,const struct taia *u,const struct taia *v)
{
unsigned long unano = u->nano;
unsigned long uatto = u->atto;
-
+
t->sec.x = u->sec.x - v->sec.x;
t->nano = unano - v->nano;
t->atto = uatto - v->atto;
diff --git a/runit/runsv.c b/runit/runsv.c
index 9e117fe0a..aace041a8 100644
--- a/runit/runsv.c
+++ b/runit/runsv.c
@@ -300,7 +300,7 @@ static void startservice(struct svdir *s)
fatal_cannot("setup filedescriptor for ./log/run");
close(logpipe[1]);
if (chdir("./log") == -1)
- fatal_cannot("change directory to ./log");
+ fatal_cannot("change directory to ./log");
} else {
if (fd_copy(1, logpipe[1]) == -1)
fatal_cannot("setup filedescriptor for ./run");
@@ -405,7 +405,7 @@ int runsv_main(int argc, char **argv)
coe(selfpipe[1]);
ndelay_on(selfpipe[0]);
ndelay_on(selfpipe[1]);
-
+
sig_block(sig_child);
sig_catch(sig_child, s_child);
sig_block(sig_term);
@@ -544,7 +544,7 @@ int runsv_main(int argc, char **argv)
for (;;) {
int child;
int wstat;
-
+
child = wait_nohang(&wstat);
if (!child) break;
if ((child == -1) && (errno != EINTR)) break;
diff --git a/runit/runsvdir.c b/runit/runsvdir.c
index 9238eec82..3290da5e6 100644
--- a/runit/runsvdir.c
+++ b/runit/runsvdir.c
@@ -36,7 +36,7 @@ static void fatal2_cannot(char *m1, char *m2)
static void warn3x(char *m1, char *m2, char *m3)
{
bb_error_msg("%s: warning: %s%s%s", svdir, m1, m2, m3);
-}
+}
static void warn2_cannot(char *m1, char *m2)
{
warn3x("cannot ", m1, m2);
@@ -44,7 +44,7 @@ static void warn2_cannot(char *m1, char *m2)
static void warnx(char *m1)
{
warn3x(m1, "", "");
-}
+}
static void s_term(int sig_no)
{
@@ -208,7 +208,7 @@ int runsvdir_main(int argc, char **argv)
}
}
curdir = open_read(".");
- if (curdir == -1)
+ if (curdir == -1)
fatal2_cannot("open current directory", "");
coe(curdir);
@@ -241,7 +241,7 @@ int runsvdir_main(int argc, char **argv)
/* wait at least a second */
taia_uint(&deadline, 1);
taia_add(&stampcheck, &now, &deadline);
-
+
if (stat(svdir, &s) != -1) {
if (check || s.st_mtime != mtime
|| s.st_ino != ino || s.st_dev != dev
diff --git a/runit/sv.c b/runit/sv.c
index 9471d09a8..054053619 100644
--- a/runit/sv.c
+++ b/runit/sv.c
@@ -88,7 +88,7 @@ static unsigned svstatus_print(char *m)
int pid;
int normallyup = 0;
struct stat s;
-
+
if (stat("down", &s) == -1) {
if (errno != ENOENT) {
bb_perror_msg(WARN"cannot stat %s/down", *service);
diff --git a/runit/svlogd.c b/runit/svlogd.c
index c91f85fe1..b089c5498 100644
--- a/runit/svlogd.c
+++ b/runit/svlogd.c
@@ -141,7 +141,7 @@ static unsigned processorstart(struct logdir *ld)
sig_unblock(sig_term);
sig_unblock(sig_alarm);
sig_unblock(sig_hangup);
-
+
if (verbose)
bb_error_msg(INFO"processing: %s/%s", ld->name, ld->fnsave);
fd = xopen(ld->fnsave, O_RDONLY|O_NDELAY);
@@ -549,12 +549,12 @@ static unsigned logdir_open(struct logdir *ld, const char *fn)
coe(ld->fdcur);
while (fchmod(ld->fdcur, 0644) == -1)
pause2cannot("set mode of current", ld->name);
-
+
if (verbose) {
if (i == 0) bb_error_msg(INFO"append: %s/current", ld->name);
else bb_error_msg(INFO"new: %s/current", ld->name);
}
-
+
while (fchdir(fdwdir) == -1)
pause1cannot("change to initial working directory");
return 1;
@@ -569,7 +569,7 @@ static void logdirs_reopen(void)
tmaxflag = 0;
taia_now(&now);
for (l = 0; l < dirn; ++l) {
- logdir_close(&dir[l]);
+ logdir_close(&dir[l]);
if (logdir_open(&dir[l], fndir[l])) ok = 1;
}
if (!ok) fatalx("no functional log directories");