aboutsummaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/mdev.c1
-rw-r--r--util-linux/mkswap.c3
-rw-r--r--util-linux/more.c2
-rw-r--r--util-linux/mount.c2
-rw-r--r--util-linux/swaponoff.c2
-rw-r--r--util-linux/uevent.c3
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 {
} FIX_ALIASING;
#define G (*(struct globals*)bb_common_bufsiz1)
#define INIT_G() do { \
+ setup_common_bufsiz(); \
IF_NOT_FEATURE_MDEV_CONF(G.cur_rule.maj = -1;) \
IF_NOT_FEATURE_MDEV_CONF(G.cur_rule.mode = 0660;) \
} 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 {
#define NWORDS 129
#define hdr ((struct swap_header_v1*)bb_common_bufsiz1)
+#define INIT_G() do { setup_common_bufsiz(); } while (0)
struct BUG_sizes {
char swap_header_v1_wrong[sizeof(*hdr) != (NWORDS * 4) ? -1 : 1];
@@ -93,6 +94,8 @@ int mkswap_main(int argc UNUSED_PARAM, char **argv)
off_t len;
const char *label = "";
+ INIT_G();
+
opt_complementary = "-1"; /* at least one param */
/* TODO: -p PAGESZ, -U UUID */
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 {
struct termios new_settings;
} FIX_ALIASING;
#define G (*(struct globals*)bb_common_bufsiz1)
-#define INIT_G() ((void)0)
#define initial_settings (G.initial_settings)
#define new_settings (G.new_settings )
#define cin_fileno (G.cin_fileno )
+#define INIT_G() do { setup_common_bufsiz(); } while (0)
#define setTermSettings(fd, argp) \
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
#endif
#define fslist (G.fslist )
#define getmntent_buf (G.getmntent_buf )
-#define INIT_G() do { } while (0)
+#define INIT_G() do { setup_common_bufsiz(); } while (0)
#if ENABLE_FEATURE_MTAB_SUPPORT
/*
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 {
#define save_g_flags() ((void)0)
#define restore_g_flags() ((void)0)
#endif
-#define INIT_G() do { } while (0)
+#define INIT_G() do { setup_common_bufsiz(); } while (0)
#define do_swapoff (applet_name[5] == 'f')
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 @@
#define BUFFER_SIZE 16*1024
#define env ((char **)bb_common_bufsiz1)
+#define INIT_G() do { setup_common_bufsiz(); } while (0)
enum {
MAX_ENV = COMMON_BUFSIZE / sizeof(env[0]) - 1,
};
@@ -46,6 +47,8 @@ int uevent_main(int argc UNUSED_PARAM, char **argv)
struct sockaddr_nl sa;
int fd;
+ INIT_G();
+
argv++;
// Subscribe for UEVENT kernel messages