diff options
author | Denys Vlasenko | 2010-10-13 12:53:27 +0200 |
---|---|---|
committer | Denys Vlasenko | 2010-10-13 12:53:27 +0200 |
commit | 05e8605ab8a01120af7c9f011c2334ab34381fdf (patch) | |
tree | f200589bc4e66c649788cc58d5a6f4fc013dbe45 /runit/sv.c | |
parent | b1db09be5a19f814ed5dc7e0ab095c3355926da6 (diff) | |
download | busybox-05e8605ab8a01120af7c9f011c2334ab34381fdf.zip busybox-05e8605ab8a01120af7c9f011c2334ab34381fdf.tar.gz |
remove runit/runit_lib.c
function old new delta
runsv_main 1770 1786 +16
svstatus_get 176 188 +12
sv_main 1180 1186 +6
runsvdir_main 683 689 +6
processorstart 385 391 +6
control 126 132 +6
logdir_open 1184 1187 +3
lock_exnb 14 - -14
lock_ex 14 - -14
open_write 17 - -17
open_read 17 - -17
------------------------------------------------------------------------------
(add/remove: 0/5 grow/shrink: 7/0 up/down: 55/-62) Total: -7 bytes
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'runit/sv.c')
-rw-r--r-- | runit/sv.c | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -176,6 +176,9 @@ struct globals { #define INIT_G() do { } while (0) +#define str_equal(s,t) (!strcmp((s), (t))) + + static void fatal_cannot(const char *m1) NORETURN; static void fatal_cannot(const char *m1) { @@ -221,7 +224,7 @@ static int svstatus_get(void) { int fd, r; - fd = open_write("supervise/ok"); + fd = open("supervise/ok", O_WRONLY|O_NDELAY); if (fd == -1) { if (errno == ENODEV) { *acts == 'x' ? ok("runsv not running") @@ -232,7 +235,7 @@ static int svstatus_get(void) return -1; } close(fd); - fd = open_read("supervise/status"); + fd = open("supervise/status", O_RDONLY|O_NDELAY); if (fd == -1) { warn("can't open supervise/status"); return -1; @@ -397,7 +400,7 @@ static int control(const char *a) if (svstatus.want == *a) return 0; */ - fd = open_write("supervise/control"); + fd = open("supervise/control", O_WRONLY|O_NDELAY); if (fd == -1) { if (errno != ENODEV) warn("can't open supervise/control"); @@ -446,7 +449,7 @@ int sv_main(int argc UNUSED_PARAM, char **argv) tnow = time(NULL) + 0x400000000000000aULL; tstart = tnow; - curdir = open_read("."); + curdir = open(".", O_RDONLY|O_NDELAY); if (curdir == -1) fatal_cannot("open current directory"); |