From 47cfbf32fd66563f8c4e09ad6cced6abfbe2fad5 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Thu, 21 Apr 2016 18:18:48 +0200 Subject: *: add most of the required setup_common_bufsiz() calls Signed-off-by: Denys Vlasenko --- coreutils/dd.c | 1 + coreutils/du.c | 2 +- coreutils/expr.c | 2 +- coreutils/ls.c | 1 + coreutils/od_bloaty.c | 1 + coreutils/tail.c | 2 +- 6 files changed, 6 insertions(+), 3 deletions(-) (limited to 'coreutils') diff --git a/coreutils/dd.c b/coreutils/dd.c index a5b8882a0..4dc302926 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 3d6777670..1240bcbbc 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 59a66d9c5..ce6b2d189 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 e8c3e0490..344b4e61e 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 1e252caf0..c8a654165 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 cdc9fb66a..39f87679e 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) { -- cgit v1.2.3