diff options
Diffstat (limited to 'util-linux/mkswap.c')
-rw-r--r-- | util-linux/mkswap.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/util-linux/mkswap.c b/util-linux/mkswap.c index b5d2c49b6..dcb53f008 100644 --- a/util-linux/mkswap.c +++ b/util-linux/mkswap.c | |||
@@ -13,6 +13,7 @@ | |||
13 | //usage: "\n -L LBL Label" | 13 | //usage: "\n -L LBL Label" |
14 | 14 | ||
15 | #include "libbb.h" | 15 | #include "libbb.h" |
16 | #include "common_bufsiz.h" | ||
16 | 17 | ||
17 | #if ENABLE_SELINUX | 18 | #if ENABLE_SELINUX |
18 | static void mkswap_selinux_setcontext(int fd, const char *path) | 19 | static void mkswap_selinux_setcontext(int fd, const char *path) |
@@ -75,6 +76,7 @@ struct swap_header_v1 { | |||
75 | 76 | ||
76 | #define NWORDS 129 | 77 | #define NWORDS 129 |
77 | #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) | ||
78 | 80 | ||
79 | struct BUG_sizes { | 81 | struct BUG_sizes { |
80 | char swap_header_v1_wrong[sizeof(*hdr) != (NWORDS * 4) ? -1 : 1]; | 82 | char swap_header_v1_wrong[sizeof(*hdr) != (NWORDS * 4) ? -1 : 1]; |
@@ -92,6 +94,8 @@ int mkswap_main(int argc UNUSED_PARAM, char **argv) | |||
92 | off_t len; | 94 | off_t len; |
93 | const char *label = ""; | 95 | const char *label = ""; |
94 | 96 | ||
97 | INIT_G(); | ||
98 | |||
95 | opt_complementary = "-1"; /* at least one param */ | 99 | opt_complementary = "-1"; /* at least one param */ |
96 | /* TODO: -p PAGESZ, -U UUID */ | 100 | /* TODO: -p PAGESZ, -U UUID */ |
97 | getopt32(argv, "L:", &label); | 101 | getopt32(argv, "L:", &label); |