summaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
authorDenys Vlasenko2016-04-21 18:18:48 +0200
committerDenys Vlasenko2016-04-21 18:18:48 +0200
commit47cfbf32fd66563f8c4e09ad6cced6abfbe2fad5 (patch)
tree05127e986021176649f2dd660a92ef8b8e107e92 /coreutils
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 'coreutils')
-rw-r--r--coreutils/dd.c1
-rw-r--r--coreutils/du.c2
-rw-r--r--coreutils/expr.c2
-rw-r--r--coreutils/ls.c1
-rw-r--r--coreutils/od_bloaty.c1
-rw-r--r--coreutils/tail.c2
6 files changed, 6 insertions, 3 deletions
diff --git a/coreutils/dd.c b/coreutils/dd.c
index a5b8882..4dc3029 100644
--- a/coreutils/dd.c
+++ b/coreutils/dd.c
@@ -111,6 +111,7 @@ struct globals {
} FIX_ALIASING;
#define G (*(struct globals*)bb_common_bufsiz1)
#define INIT_G() do { \
+ setup_common_bufsiz(); \
/* we have to zero it out because of NOEXEC */ \
memset(&G, 0, sizeof(G)); \
} while (0)
diff --git a/coreutils/du.c b/coreutils/du.c
index 3d67776..1240bcb 100644
--- a/coreutils/du.c
+++ b/coreutils/du.c
@@ -87,7 +87,7 @@ struct globals {
dev_t dir_dev;
} 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 void print(unsigned long long size, const char *filename)
diff --git a/coreutils/expr.c b/coreutils/expr.c
index 59a66d9..ce6b2d1 100644
--- a/coreutils/expr.c
+++ b/coreutils/expr.c
@@ -101,7 +101,7 @@ struct globals {
char **args;
} FIX_ALIASING;
#define G (*(struct globals*)bb_common_bufsiz1)
-#define INIT_G() do { } while (0)
+#define INIT_G() do { setup_common_bufsiz(); } while (0)
/* forward declarations */
static VALUE *eval(void);
diff --git a/coreutils/ls.c b/coreutils/ls.c
index e8c3e04..344b4e6 100644
--- a/coreutils/ls.c
+++ b/coreutils/ls.c
@@ -368,6 +368,7 @@ struct globals {
} FIX_ALIASING;
#define G (*(struct globals*)bb_common_bufsiz1)
#define INIT_G() do { \
+ setup_common_bufsiz(); \
/* we have to zero it out because of NOEXEC */ \
memset(&G, 0, sizeof(G)); \
IF_FEATURE_AUTOWIDTH(G_terminal_width = TERMINAL_WIDTH;) \
diff --git a/coreutils/od_bloaty.c b/coreutils/od_bloaty.c
index 1e252ca..c8a6541 100644
--- a/coreutils/od_bloaty.c
+++ b/coreutils/od_bloaty.c
@@ -217,6 +217,7 @@ enum { G_pseudo_offset = 0 };
#endif
#define G (*(struct globals*)bb_common_bufsiz1)
#define INIT_G() do { \
+ setup_common_bufsiz(); \
BUILD_BUG_ON(sizeof(G) > COMMON_BUFSIZE); \
G.bytes_per_block = 32; \
} while (0)
diff --git a/coreutils/tail.c b/coreutils/tail.c
index cdc9fb6..39f8767 100644
--- a/coreutils/tail.c
+++ b/coreutils/tail.c
@@ -56,7 +56,7 @@ struct globals {
bool exitcode;
} 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 void tail_xprint_header(const char *fmt, const char *filename)
{