summaryrefslogtreecommitdiff
path: root/util-linux/mkswap.c
diff options
context:
space:
mode:
authorDenys Vlasenko2016-04-21 18:18:48 +0200
committerDenys Vlasenko2016-04-21 18:18:48 +0200
commit47cfbf32fd66563f8c4e09ad6cced6abfbe2fad5 (patch)
tree05127e986021176649f2dd660a92ef8b8e107e92 /util-linux/mkswap.c
parente6a2f4cc5a47d3022bdf5ca2cacbaa5a8c5baf7a (diff)
downloadbusybox-47cfbf32fd66563f8c4e09ad6cced6abfbe2fad5.zip
busybox-47cfbf32fd66563f8c4e09ad6cced6abfbe2fad5.tar.gz
*: add most of the required setup_common_bufsiz() calls
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
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 f945179..dcb53f0 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);