summaryrefslogtreecommitdiff
path: root/procps
diff options
context:
space:
mode:
authorDenys Vlasenko2016-04-21 18:18:48 +0200
committerDenys Vlasenko2016-04-21 18:18:48 +0200
commit47cfbf32fd66563f8c4e09ad6cced6abfbe2fad5 (patch)
tree05127e986021176649f2dd660a92ef8b8e107e92 /procps
parente6a2f4cc5a47d3022bdf5ca2cacbaa5a8c5baf7a (diff)
downloadbusybox-47cfbf32fd66563f8c4e09ad6cced6abfbe2fad5.zip
busybox-47cfbf32fd66563f8c4e09ad6cced6abfbe2fad5.tar.gz
*: 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.c2
-rw-r--r--procps/fuser.c1
-rw-r--r--procps/ps.c2
-rw-r--r--procps/top.c1
4 files changed, 4 insertions, 2 deletions
diff --git a/procps/free.c b/procps/free.c
index 9fde64b..fca9a22 100644
--- a/procps/free.c
+++ b/procps/free.c
@@ -37,7 +37,7 @@ struct globals {
#endif
} FIX_ALIASING;
#define G (*(struct globals*)bb_common_bufsiz1)
-#define INIT_G() do { } while (0)
+#define INIT_G() do { setup_common_bufsiz(); } while (0)
static unsigned long long scale(unsigned long d)
diff --git a/procps/fuser.c b/procps/fuser.c
index 2cda0f9..6dac852 100644
--- a/procps/fuser.c
+++ b/procps/fuser.c
@@ -46,6 +46,7 @@ struct globals {
} FIX_ALIASING;
#define G (*(struct globals*)bb_common_bufsiz1)
#define INIT_G() do { \
+ setup_common_bufsiz(); \
G.mypid = getpid(); \
G.killsig = SIGKILL; \
} while (0)
diff --git a/procps/ps.c b/procps/ps.c
index 65d62e2..08dfce1 100644
--- a/procps/ps.c
+++ b/procps/ps.c
@@ -153,7 +153,7 @@ struct globals {
#define buffer (G.buffer )
#define terminal_width (G.terminal_width )
#define kernel_HZ (G.kernel_HZ )
-#define INIT_G() do { } while (0)
+#define INIT_G() do { setup_common_bufsiz(); } while (0)
#if ENABLE_FEATURE_PS_TIME
/* for ELF executables, notes are pushed before environment and args */
diff --git a/procps/top.c b/procps/top.c
index 1c42b24..640bcdc 100644
--- a/procps/top.c
+++ b/procps/top.c
@@ -202,6 +202,7 @@ enum { LINE_BUF_SIZE = COMMON_BUFSIZE - offsetof(struct globals, line_buf) };
#define total_pcpu (G.total_pcpu )
#define line_buf (G.line_buf )
#define INIT_G() do { \
+ setup_common_bufsiz(); \
BUILD_BUG_ON(sizeof(G) > COMMON_BUFSIZE); \
BUILD_BUG_ON(LINE_BUF_SIZE <= 80); \
} while (0)