diff options
Diffstat (limited to 'util-linux')
-rw-r--r-- | util-linux/mdev.c | 1 | ||||
-rw-r--r-- | util-linux/mkswap.c | 3 | ||||
-rw-r--r-- | util-linux/more.c | 2 | ||||
-rw-r--r-- | util-linux/mount.c | 2 | ||||
-rw-r--r-- | util-linux/swaponoff.c | 2 | ||||
-rw-r--r-- | util-linux/uevent.c | 3 |
6 files changed, 10 insertions, 3 deletions
diff --git a/util-linux/mdev.c b/util-linux/mdev.c index 7473b1855..37514eb54 100644 --- a/util-linux/mdev.c +++ b/util-linux/mdev.c | |||
@@ -288,6 +288,7 @@ struct globals { | |||
288 | } FIX_ALIASING; | 288 | } FIX_ALIASING; |
289 | #define G (*(struct globals*)bb_common_bufsiz1) | 289 | #define G (*(struct globals*)bb_common_bufsiz1) |
290 | #define INIT_G() do { \ | 290 | #define INIT_G() do { \ |
291 | setup_common_bufsiz(); \ | ||
291 | IF_NOT_FEATURE_MDEV_CONF(G.cur_rule.maj = -1;) \ | 292 | IF_NOT_FEATURE_MDEV_CONF(G.cur_rule.maj = -1;) \ |
292 | IF_NOT_FEATURE_MDEV_CONF(G.cur_rule.mode = 0660;) \ | 293 | IF_NOT_FEATURE_MDEV_CONF(G.cur_rule.mode = 0660;) \ |
293 | } while (0) | 294 | } while (0) |
diff --git a/util-linux/mkswap.c b/util-linux/mkswap.c index f9451792b..dcb53f008 100644 --- a/util-linux/mkswap.c +++ b/util-linux/mkswap.c | |||
@@ -76,6 +76,7 @@ struct swap_header_v1 { | |||
76 | 76 | ||
77 | #define NWORDS 129 | 77 | #define NWORDS 129 |
78 | #define hdr ((struct swap_header_v1*)bb_common_bufsiz1) | 78 | #define hdr ((struct swap_header_v1*)bb_common_bufsiz1) |
79 | #define INIT_G() do { setup_common_bufsiz(); } while (0) | ||
79 | 80 | ||
80 | struct BUG_sizes { | 81 | struct BUG_sizes { |
81 | char swap_header_v1_wrong[sizeof(*hdr) != (NWORDS * 4) ? -1 : 1]; | 82 | char swap_header_v1_wrong[sizeof(*hdr) != (NWORDS * 4) ? -1 : 1]; |
@@ -93,6 +94,8 @@ int mkswap_main(int argc UNUSED_PARAM, char **argv) | |||
93 | off_t len; | 94 | off_t len; |
94 | const char *label = ""; | 95 | const char *label = ""; |
95 | 96 | ||
97 | INIT_G(); | ||
98 | |||
96 | opt_complementary = "-1"; /* at least one param */ | 99 | opt_complementary = "-1"; /* at least one param */ |
97 | /* TODO: -p PAGESZ, -U UUID */ | 100 | /* TODO: -p PAGESZ, -U UUID */ |
98 | getopt32(argv, "L:", &label); | 101 | getopt32(argv, "L:", &label); |
diff --git a/util-linux/more.c b/util-linux/more.c index 58be3ac3b..95cbdd994 100644 --- a/util-linux/more.c +++ b/util-linux/more.c | |||
@@ -33,10 +33,10 @@ struct globals { | |||
33 | struct termios new_settings; | 33 | struct termios new_settings; |
34 | } FIX_ALIASING; | 34 | } FIX_ALIASING; |
35 | #define G (*(struct globals*)bb_common_bufsiz1) | 35 | #define G (*(struct globals*)bb_common_bufsiz1) |
36 | #define INIT_G() ((void)0) | ||
37 | #define initial_settings (G.initial_settings) | 36 | #define initial_settings (G.initial_settings) |
38 | #define new_settings (G.new_settings ) | 37 | #define new_settings (G.new_settings ) |
39 | #define cin_fileno (G.cin_fileno ) | 38 | #define cin_fileno (G.cin_fileno ) |
39 | #define INIT_G() do { setup_common_bufsiz(); } while (0) | ||
40 | 40 | ||
41 | #define setTermSettings(fd, argp) \ | 41 | #define setTermSettings(fd, argp) \ |
42 | do { \ | 42 | do { \ |
diff --git a/util-linux/mount.c b/util-linux/mount.c index e5c85feff..244f4fa27 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c | |||
@@ -457,7 +457,7 @@ enum { GETMNTENT_BUFSIZE = COMMON_BUFSIZE - offsetof(struct globals, getmntent_b | |||
457 | #endif | 457 | #endif |
458 | #define fslist (G.fslist ) | 458 | #define fslist (G.fslist ) |
459 | #define getmntent_buf (G.getmntent_buf ) | 459 | #define getmntent_buf (G.getmntent_buf ) |
460 | #define INIT_G() do { } while (0) | 460 | #define INIT_G() do { setup_common_bufsiz(); } while (0) |
461 | 461 | ||
462 | #if ENABLE_FEATURE_MTAB_SUPPORT | 462 | #if ENABLE_FEATURE_MTAB_SUPPORT |
463 | /* | 463 | /* |
diff --git a/util-linux/swaponoff.c b/util-linux/swaponoff.c index 43228a6ba..6713852e5 100644 --- a/util-linux/swaponoff.c +++ b/util-linux/swaponoff.c | |||
@@ -72,7 +72,7 @@ struct globals { | |||
72 | #define save_g_flags() ((void)0) | 72 | #define save_g_flags() ((void)0) |
73 | #define restore_g_flags() ((void)0) | 73 | #define restore_g_flags() ((void)0) |
74 | #endif | 74 | #endif |
75 | #define INIT_G() do { } while (0) | 75 | #define INIT_G() do { setup_common_bufsiz(); } while (0) |
76 | 76 | ||
77 | #define do_swapoff (applet_name[5] == 'f') | 77 | #define do_swapoff (applet_name[5] == 'f') |
78 | 78 | ||
diff --git a/util-linux/uevent.c b/util-linux/uevent.c index 58668fa5d..b98fe6160 100644 --- a/util-linux/uevent.c +++ b/util-linux/uevent.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #define BUFFER_SIZE 16*1024 | 31 | #define BUFFER_SIZE 16*1024 |
32 | 32 | ||
33 | #define env ((char **)bb_common_bufsiz1) | 33 | #define env ((char **)bb_common_bufsiz1) |
34 | #define INIT_G() do { setup_common_bufsiz(); } while (0) | ||
34 | enum { | 35 | enum { |
35 | MAX_ENV = COMMON_BUFSIZE / sizeof(env[0]) - 1, | 36 | MAX_ENV = COMMON_BUFSIZE / sizeof(env[0]) - 1, |
36 | }; | 37 | }; |
@@ -46,6 +47,8 @@ int uevent_main(int argc UNUSED_PARAM, char **argv) | |||
46 | struct sockaddr_nl sa; | 47 | struct sockaddr_nl sa; |
47 | int fd; | 48 | int fd; |
48 | 49 | ||
50 | INIT_G(); | ||
51 | |||
49 | argv++; | 52 | argv++; |
50 | 53 | ||
51 | // Subscribe for UEVENT kernel messages | 54 | // Subscribe for UEVENT kernel messages |