aboutsummaryrefslogtreecommitdiff
path: root/util-linux/mdev.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2011-09-21 01:59:15 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2011-09-21 01:59:15 +0200
commit16714245f9a16ce3725aab079aea7b0d28c6b32f (patch)
tree41edbcd1c279b2baae2d5e5751639076e0a3bfad /util-linux/mdev.c
parent5c6ba6c56f9653488e1d805e727bb06c39ed23fa (diff)
downloadbusybox-16714245f9a16ce3725aab079aea7b0d28c6b32f.tar.gz
add INIT_G()'s. No code changes.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'util-linux/mdev.c')
-rw-r--r--util-linux/mdev.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/util-linux/mdev.c b/util-linux/mdev.c
index 27b35572d..c56741b08 100644
--- a/util-linux/mdev.c
+++ b/util-linux/mdev.c
@@ -173,6 +173,8 @@ struct globals {
char *subsystem;
} FIX_ALIASING;
#define G (*(struct globals*)&bb_common_bufsiz1)
+#define INIT_G() do { } while (0)
+
/* Prevent infinite loops in /sys symlinks */
#define MAX_SYSFS_DEPTH 3
@@ -180,6 +182,7 @@ struct globals {
/* We use additional 64+ bytes in make_device() */
#define SCRATCH_SIZE 80
+
/* Builds an alias path.
* This function potentionally reallocates the alias parameter.
* Only used for ENABLE_FEATURE_MDEV_RENAME
@@ -613,6 +616,8 @@ int mdev_main(int argc UNUSED_PARAM, char **argv)
{
RESERVE_CONFIG_BUFFER(temp, PATH_MAX + SCRATCH_SIZE);
+ INIT_G();
+
/* We can be called as hotplug helper */
/* Kernel cannot provide suitable stdio fds for us, do it ourself */
bb_sanitize_stdio();