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 /coreutils | |
| 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 'coreutils')
| -rw-r--r-- | coreutils/dd.c | 1 | ||||
| -rw-r--r-- | coreutils/du.c | 2 | ||||
| -rw-r--r-- | coreutils/expr.c | 2 | ||||
| -rw-r--r-- | coreutils/ls.c | 1 | ||||
| -rw-r--r-- | coreutils/od_bloaty.c | 1 | ||||
| -rw-r--r-- | coreutils/tail.c | 2 |
6 files changed, 6 insertions, 3 deletions
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 { | |||
| 111 | } FIX_ALIASING; | 111 | } FIX_ALIASING; |
| 112 | #define G (*(struct globals*)bb_common_bufsiz1) | 112 | #define G (*(struct globals*)bb_common_bufsiz1) |
| 113 | #define INIT_G() do { \ | 113 | #define INIT_G() do { \ |
| 114 | setup_common_bufsiz(); \ | ||
| 114 | /* we have to zero it out because of NOEXEC */ \ | 115 | /* we have to zero it out because of NOEXEC */ \ |
| 115 | memset(&G, 0, sizeof(G)); \ | 116 | memset(&G, 0, sizeof(G)); \ |
| 116 | } while (0) | 117 | } 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 { | |||
| 87 | dev_t dir_dev; | 87 | dev_t dir_dev; |
| 88 | } FIX_ALIASING; | 88 | } FIX_ALIASING; |
| 89 | #define G (*(struct globals*)bb_common_bufsiz1) | 89 | #define G (*(struct globals*)bb_common_bufsiz1) |
| 90 | #define INIT_G() do { } while (0) | 90 | #define INIT_G() do { setup_common_bufsiz(); } while (0) |
| 91 | 91 | ||
| 92 | 92 | ||
| 93 | static void print(unsigned long long size, const char *filename) | 93 | 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 { | |||
| 101 | char **args; | 101 | char **args; |
| 102 | } FIX_ALIASING; | 102 | } FIX_ALIASING; |
| 103 | #define G (*(struct globals*)bb_common_bufsiz1) | 103 | #define G (*(struct globals*)bb_common_bufsiz1) |
| 104 | #define INIT_G() do { } while (0) | 104 | #define INIT_G() do { setup_common_bufsiz(); } while (0) |
| 105 | 105 | ||
| 106 | /* forward declarations */ | 106 | /* forward declarations */ |
| 107 | static VALUE *eval(void); | 107 | 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 { | |||
| 368 | } FIX_ALIASING; | 368 | } FIX_ALIASING; |
| 369 | #define G (*(struct globals*)bb_common_bufsiz1) | 369 | #define G (*(struct globals*)bb_common_bufsiz1) |
| 370 | #define INIT_G() do { \ | 370 | #define INIT_G() do { \ |
| 371 | setup_common_bufsiz(); \ | ||
| 371 | /* we have to zero it out because of NOEXEC */ \ | 372 | /* we have to zero it out because of NOEXEC */ \ |
| 372 | memset(&G, 0, sizeof(G)); \ | 373 | memset(&G, 0, sizeof(G)); \ |
| 373 | IF_FEATURE_AUTOWIDTH(G_terminal_width = TERMINAL_WIDTH;) \ | 374 | 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 }; | |||
| 217 | #endif | 217 | #endif |
| 218 | #define G (*(struct globals*)bb_common_bufsiz1) | 218 | #define G (*(struct globals*)bb_common_bufsiz1) |
| 219 | #define INIT_G() do { \ | 219 | #define INIT_G() do { \ |
| 220 | setup_common_bufsiz(); \ | ||
| 220 | BUILD_BUG_ON(sizeof(G) > COMMON_BUFSIZE); \ | 221 | BUILD_BUG_ON(sizeof(G) > COMMON_BUFSIZE); \ |
| 221 | G.bytes_per_block = 32; \ | 222 | G.bytes_per_block = 32; \ |
| 222 | } while (0) | 223 | } 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 { | |||
| 56 | bool exitcode; | 56 | bool exitcode; |
| 57 | } FIX_ALIASING; | 57 | } FIX_ALIASING; |
| 58 | #define G (*(struct globals*)bb_common_bufsiz1) | 58 | #define G (*(struct globals*)bb_common_bufsiz1) |
| 59 | #define INIT_G() do { } while (0) | 59 | #define INIT_G() do { setup_common_bufsiz(); } while (0) |
| 60 | 60 | ||
| 61 | static void tail_xprint_header(const char *fmt, const char *filename) | 61 | static void tail_xprint_header(const char *fmt, const char *filename) |
| 62 | { | 62 | { |
