diff options
author | Ron Yorston <rmy@pobox.com> | 2016-05-16 09:33:03 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2016-05-16 09:33:03 +0100 |
commit | 35d2f5bccb0f3dde600702ebcdb5424d4d50be4a (patch) | |
tree | 6e0ff0341c69839e268459a199682628bae734ed /runit | |
parent | 248a2600a2f4b442101ad568d1994b908bb28d4b (diff) | |
parent | f2559e5c2b7bd2c5fa0dd8e88d0a931da92a23af (diff) | |
download | busybox-w32-35d2f5bccb0f3dde600702ebcdb5424d4d50be4a.tar.gz busybox-w32-35d2f5bccb0f3dde600702ebcdb5424d4d50be4a.tar.bz2 busybox-w32-35d2f5bccb0f3dde600702ebcdb5424d4d50be4a.zip |
Merge branch 'busybox' into merge
Diffstat (limited to 'runit')
-rw-r--r-- | runit/runsv.c | 4 | ||||
-rw-r--r-- | runit/runsvdir.c | 5 | ||||
-rw-r--r-- | runit/sv.c | 5 | ||||
-rw-r--r-- | runit/svlogd.c | 9 |
4 files changed, 14 insertions, 9 deletions
diff --git a/runit/runsv.c b/runit/runsv.c index 4b18d12d5..e0e31508a 100644 --- a/runit/runsv.c +++ b/runit/runsv.c | |||
@@ -45,6 +45,7 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |||
45 | 45 | ||
46 | #include <sys/file.h> | 46 | #include <sys/file.h> |
47 | #include "libbb.h" | 47 | #include "libbb.h" |
48 | #include "common_bufsiz.h" | ||
48 | #include "runit_lib.h" | 49 | #include "runit_lib.h" |
49 | 50 | ||
50 | #if ENABLE_MONOTONIC_SYSCALL | 51 | #if ENABLE_MONOTONIC_SYSCALL |
@@ -105,7 +106,7 @@ struct globals { | |||
105 | char *dir; | 106 | char *dir; |
106 | struct svdir svd[2]; | 107 | struct svdir svd[2]; |
107 | } FIX_ALIASING; | 108 | } FIX_ALIASING; |
108 | #define G (*(struct globals*)&bb_common_bufsiz1) | 109 | #define G (*(struct globals*)bb_common_bufsiz1) |
109 | #define haslog (G.haslog ) | 110 | #define haslog (G.haslog ) |
110 | #define sigterm (G.sigterm ) | 111 | #define sigterm (G.sigterm ) |
111 | #define pidchanged (G.pidchanged ) | 112 | #define pidchanged (G.pidchanged ) |
@@ -114,6 +115,7 @@ struct globals { | |||
114 | #define dir (G.dir ) | 115 | #define dir (G.dir ) |
115 | #define svd (G.svd ) | 116 | #define svd (G.svd ) |
116 | #define INIT_G() do { \ | 117 | #define INIT_G() do { \ |
118 | setup_common_bufsiz(); \ | ||
117 | pidchanged = 1; \ | 119 | pidchanged = 1; \ |
118 | } while (0) | 120 | } while (0) |
119 | 121 | ||
diff --git a/runit/runsvdir.c b/runit/runsvdir.c index b3d9e7390..2b7927542 100644 --- a/runit/runsvdir.c +++ b/runit/runsvdir.c | |||
@@ -57,6 +57,7 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |||
57 | 57 | ||
58 | #include <sys/file.h> | 58 | #include <sys/file.h> |
59 | #include "libbb.h" | 59 | #include "libbb.h" |
60 | #include "common_bufsiz.h" | ||
60 | #include "runit_lib.h" | 61 | #include "runit_lib.h" |
61 | 62 | ||
62 | #define MAXSERVICES 1000 | 63 | #define MAXSERVICES 1000 |
@@ -84,7 +85,7 @@ struct globals { | |||
84 | unsigned stamplog; | 85 | unsigned stamplog; |
85 | #endif | 86 | #endif |
86 | } FIX_ALIASING; | 87 | } FIX_ALIASING; |
87 | #define G (*(struct globals*)&bb_common_bufsiz1) | 88 | #define G (*(struct globals*)bb_common_bufsiz1) |
88 | #define sv (G.sv ) | 89 | #define sv (G.sv ) |
89 | #define svdir (G.svdir ) | 90 | #define svdir (G.svdir ) |
90 | #define svnum (G.svnum ) | 91 | #define svnum (G.svnum ) |
@@ -92,7 +93,7 @@ struct globals { | |||
92 | #define logpipe (G.logpipe ) | 93 | #define logpipe (G.logpipe ) |
93 | #define pfd (G.pfd ) | 94 | #define pfd (G.pfd ) |
94 | #define stamplog (G.stamplog ) | 95 | #define stamplog (G.stamplog ) |
95 | #define INIT_G() do { } while (0) | 96 | #define INIT_G() do { setup_common_bufsiz(); } while (0) |
96 | 97 | ||
97 | static void fatal2_cannot(const char *m1, const char *m2) | 98 | static void fatal2_cannot(const char *m1, const char *m2) |
98 | { | 99 | { |
diff --git a/runit/sv.c b/runit/sv.c index de8a0d8a4..2a256a6b4 100644 --- a/runit/sv.c +++ b/runit/sv.c | |||
@@ -189,6 +189,7 @@ Exit Codes | |||
189 | 189 | ||
190 | #include <sys/file.h> | 190 | #include <sys/file.h> |
191 | #include "libbb.h" | 191 | #include "libbb.h" |
192 | #include "common_bufsiz.h" | ||
192 | #include "runit_lib.h" | 193 | #include "runit_lib.h" |
193 | 194 | ||
194 | struct globals { | 195 | struct globals { |
@@ -199,14 +200,14 @@ struct globals { | |||
199 | uint64_t tstart, tnow; | 200 | uint64_t tstart, tnow; |
200 | svstatus_t svstatus; | 201 | svstatus_t svstatus; |
201 | } FIX_ALIASING; | 202 | } FIX_ALIASING; |
202 | #define G (*(struct globals*)&bb_common_bufsiz1) | 203 | #define G (*(struct globals*)bb_common_bufsiz1) |
203 | #define acts (G.acts ) | 204 | #define acts (G.acts ) |
204 | #define service (G.service ) | 205 | #define service (G.service ) |
205 | #define rc (G.rc ) | 206 | #define rc (G.rc ) |
206 | #define tstart (G.tstart ) | 207 | #define tstart (G.tstart ) |
207 | #define tnow (G.tnow ) | 208 | #define tnow (G.tnow ) |
208 | #define svstatus (G.svstatus ) | 209 | #define svstatus (G.svstatus ) |
209 | #define INIT_G() do { } while (0) | 210 | #define INIT_G() do { setup_common_bufsiz(); } while (0) |
210 | 211 | ||
211 | 212 | ||
212 | #define str_equal(s,t) (!strcmp((s), (t))) | 213 | #define str_equal(s,t) (!strcmp((s), (t))) |
diff --git a/runit/svlogd.c b/runit/svlogd.c index dbe8df65c..7cae81cb2 100644 --- a/runit/svlogd.c +++ b/runit/svlogd.c | |||
@@ -155,6 +155,7 @@ log message, you can use a pattern like this instead | |||
155 | 155 | ||
156 | #include <sys/file.h> | 156 | #include <sys/file.h> |
157 | #include "libbb.h" | 157 | #include "libbb.h" |
158 | #include "common_bufsiz.h" | ||
158 | #include "runit_lib.h" | 159 | #include "runit_lib.h" |
159 | 160 | ||
160 | #define LESS(a,b) ((int)((unsigned)(b) - (unsigned)(a)) > 0) | 161 | #define LESS(a,b) ((int)((unsigned)(b) - (unsigned)(a)) > 0) |
@@ -233,7 +234,9 @@ struct globals { | |||
233 | #define blocked_sigset (G.blocked_sigset) | 234 | #define blocked_sigset (G.blocked_sigset) |
234 | #define fl_flag_0 (G.fl_flag_0 ) | 235 | #define fl_flag_0 (G.fl_flag_0 ) |
235 | #define dirn (G.dirn ) | 236 | #define dirn (G.dirn ) |
237 | #define line bb_common_bufsiz1 | ||
236 | #define INIT_G() do { \ | 238 | #define INIT_G() do { \ |
239 | setup_common_bufsiz(); \ | ||
237 | SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \ | 240 | SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \ |
238 | linemax = 1000; \ | 241 | linemax = 1000; \ |
239 | /*buflen = 1024;*/ \ | 242 | /*buflen = 1024;*/ \ |
@@ -241,8 +244,6 @@ struct globals { | |||
241 | replace = ""; \ | 244 | replace = ""; \ |
242 | } while (0) | 245 | } while (0) |
243 | 246 | ||
244 | #define line bb_common_bufsiz1 | ||
245 | |||
246 | 247 | ||
247 | #define FATAL "fatal: " | 248 | #define FATAL "fatal: " |
248 | #define WARNING "warning: " | 249 | #define WARNING "warning: " |
@@ -1045,9 +1046,9 @@ int svlogd_main(int argc, char **argv) | |||
1045 | } | 1046 | } |
1046 | if (opt & 2) if (!repl) repl = '_'; // -R | 1047 | if (opt & 2) if (!repl) repl = '_'; // -R |
1047 | if (opt & 4) { // -l | 1048 | if (opt & 4) { // -l |
1048 | linemax = xatou_range(l, 0, BUFSIZ-26); | 1049 | linemax = xatou_range(l, 0, COMMON_BUFSIZE-26); |
1049 | if (linemax == 0) | 1050 | if (linemax == 0) |
1050 | linemax = BUFSIZ-26; | 1051 | linemax = COMMON_BUFSIZE-26; |
1051 | if (linemax < 256) | 1052 | if (linemax < 256) |
1052 | linemax = 256; | 1053 | linemax = 256; |
1053 | } | 1054 | } |