diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2016-04-21 18:18:48 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2016-04-21 18:18:48 +0200 |
commit | 47cfbf32fd66563f8c4e09ad6cced6abfbe2fad5 (patch) | |
tree | 05127e986021176649f2dd660a92ef8b8e107e92 /procps | |
parent | e6a2f4cc5a47d3022bdf5ca2cacbaa5a8c5baf7a (diff) | |
download | busybox-w32-47cfbf32fd66563f8c4e09ad6cced6abfbe2fad5.tar.gz busybox-w32-47cfbf32fd66563f8c4e09ad6cced6abfbe2fad5.tar.bz2 busybox-w32-47cfbf32fd66563f8c4e09ad6cced6abfbe2fad5.zip |
*: add most of the required setup_common_bufsiz() calls
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'procps')
-rw-r--r-- | procps/free.c | 2 | ||||
-rw-r--r-- | procps/fuser.c | 1 | ||||
-rw-r--r-- | procps/ps.c | 2 | ||||
-rw-r--r-- | procps/top.c | 1 |
4 files changed, 4 insertions, 2 deletions
diff --git a/procps/free.c b/procps/free.c index 9fde64b64..fca9a2242 100644 --- a/procps/free.c +++ b/procps/free.c | |||
@@ -37,7 +37,7 @@ struct globals { | |||
37 | #endif | 37 | #endif |
38 | } FIX_ALIASING; | 38 | } FIX_ALIASING; |
39 | #define G (*(struct globals*)bb_common_bufsiz1) | 39 | #define G (*(struct globals*)bb_common_bufsiz1) |
40 | #define INIT_G() do { } while (0) | 40 | #define INIT_G() do { setup_common_bufsiz(); } while (0) |
41 | 41 | ||
42 | 42 | ||
43 | static unsigned long long scale(unsigned long d) | 43 | static unsigned long long scale(unsigned long d) |
diff --git a/procps/fuser.c b/procps/fuser.c index 2cda0f9d7..6dac852ed 100644 --- a/procps/fuser.c +++ b/procps/fuser.c | |||
@@ -46,6 +46,7 @@ struct globals { | |||
46 | } FIX_ALIASING; | 46 | } FIX_ALIASING; |
47 | #define G (*(struct globals*)bb_common_bufsiz1) | 47 | #define G (*(struct globals*)bb_common_bufsiz1) |
48 | #define INIT_G() do { \ | 48 | #define INIT_G() do { \ |
49 | setup_common_bufsiz(); \ | ||
49 | G.mypid = getpid(); \ | 50 | G.mypid = getpid(); \ |
50 | G.killsig = SIGKILL; \ | 51 | G.killsig = SIGKILL; \ |
51 | } while (0) | 52 | } while (0) |
diff --git a/procps/ps.c b/procps/ps.c index 65d62e256..08dfce12e 100644 --- a/procps/ps.c +++ b/procps/ps.c | |||
@@ -153,7 +153,7 @@ struct globals { | |||
153 | #define buffer (G.buffer ) | 153 | #define buffer (G.buffer ) |
154 | #define terminal_width (G.terminal_width ) | 154 | #define terminal_width (G.terminal_width ) |
155 | #define kernel_HZ (G.kernel_HZ ) | 155 | #define kernel_HZ (G.kernel_HZ ) |
156 | #define INIT_G() do { } while (0) | 156 | #define INIT_G() do { setup_common_bufsiz(); } while (0) |
157 | 157 | ||
158 | #if ENABLE_FEATURE_PS_TIME | 158 | #if ENABLE_FEATURE_PS_TIME |
159 | /* for ELF executables, notes are pushed before environment and args */ | 159 | /* for ELF executables, notes are pushed before environment and args */ |
diff --git a/procps/top.c b/procps/top.c index 1c42b249c..640bcdc6d 100644 --- a/procps/top.c +++ b/procps/top.c | |||
@@ -202,6 +202,7 @@ enum { LINE_BUF_SIZE = COMMON_BUFSIZE - offsetof(struct globals, line_buf) }; | |||
202 | #define total_pcpu (G.total_pcpu ) | 202 | #define total_pcpu (G.total_pcpu ) |
203 | #define line_buf (G.line_buf ) | 203 | #define line_buf (G.line_buf ) |
204 | #define INIT_G() do { \ | 204 | #define INIT_G() do { \ |
205 | setup_common_bufsiz(); \ | ||
205 | BUILD_BUG_ON(sizeof(G) > COMMON_BUFSIZE); \ | 206 | BUILD_BUG_ON(sizeof(G) > COMMON_BUFSIZE); \ |
206 | BUILD_BUG_ON(LINE_BUF_SIZE <= 80); \ | 207 | BUILD_BUG_ON(LINE_BUF_SIZE <= 80); \ |
207 | } while (0) | 208 | } while (0) |