aboutsummaryrefslogtreecommitdiff
path: root/util-linux/mkswap.c
diff options
context:
space:
mode:
Diffstat (limited to 'util-linux/mkswap.c')
-rw-r--r--util-linux/mkswap.c3
1 files changed, 3 insertions, 0 deletions
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);