diff options
Diffstat (limited to 'util-linux/uevent.c')
-rw-r--r-- | util-linux/uevent.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/util-linux/uevent.c b/util-linux/uevent.c index 514a9e934..b98fe6160 100644 --- a/util-linux/uevent.c +++ b/util-linux/uevent.c | |||
@@ -25,11 +25,13 @@ | |||
25 | //usage: "\n"" # uevent mdev & mdev -s" | 25 | //usage: "\n"" # uevent mdev & mdev -s" |
26 | 26 | ||
27 | #include "libbb.h" | 27 | #include "libbb.h" |
28 | #include "common_bufsiz.h" | ||
28 | #include <linux/netlink.h> | 29 | #include <linux/netlink.h> |
29 | 30 | ||
30 | #define BUFFER_SIZE 16*1024 | 31 | #define BUFFER_SIZE 16*1024 |
31 | 32 | ||
32 | #define env ((char **)&bb_common_bufsiz1) | 33 | #define env ((char **)bb_common_bufsiz1) |
34 | #define INIT_G() do { setup_common_bufsiz(); } while (0) | ||
33 | enum { | 35 | enum { |
34 | MAX_ENV = COMMON_BUFSIZE / sizeof(env[0]) - 1, | 36 | MAX_ENV = COMMON_BUFSIZE / sizeof(env[0]) - 1, |
35 | }; | 37 | }; |
@@ -45,6 +47,8 @@ int uevent_main(int argc UNUSED_PARAM, char **argv) | |||
45 | struct sockaddr_nl sa; | 47 | struct sockaddr_nl sa; |
46 | int fd; | 48 | int fd; |
47 | 49 | ||
50 | INIT_G(); | ||
51 | |||
48 | argv++; | 52 | argv++; |
49 | 53 | ||
50 | // Subscribe for UEVENT kernel messages | 54 | // Subscribe for UEVENT kernel messages |