diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2016-04-21 18:18:48 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2016-04-21 18:18:48 +0200 |
commit | 47cfbf32fd66563f8c4e09ad6cced6abfbe2fad5 (patch) | |
tree | 05127e986021176649f2dd660a92ef8b8e107e92 /util-linux/mkswap.c | |
parent | e6a2f4cc5a47d3022bdf5ca2cacbaa5a8c5baf7a (diff) | |
download | busybox-w32-47cfbf32fd66563f8c4e09ad6cced6abfbe2fad5.tar.gz busybox-w32-47cfbf32fd66563f8c4e09ad6cced6abfbe2fad5.tar.bz2 busybox-w32-47cfbf32fd66563f8c4e09ad6cced6abfbe2fad5.zip |
*: 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.c | 3 |
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 { | |||
76 | 76 | ||
77 | #define NWORDS 129 | 77 | #define NWORDS 129 |
78 | #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) | ||
79 | 80 | ||
80 | struct BUG_sizes { | 81 | struct BUG_sizes { |
81 | char swap_header_v1_wrong[sizeof(*hdr) != (NWORDS * 4) ? -1 : 1]; | 82 | char swap_header_v1_wrong[sizeof(*hdr) != (NWORDS * 4) ? -1 : 1]; |
@@ -93,6 +94,8 @@ int mkswap_main(int argc UNUSED_PARAM, char **argv) | |||
93 | off_t len; | 94 | off_t len; |
94 | const char *label = ""; | 95 | const char *label = ""; |
95 | 96 | ||
97 | INIT_G(); | ||
98 | |||
96 | opt_complementary = "-1"; /* at least one param */ | 99 | opt_complementary = "-1"; /* at least one param */ |
97 | /* TODO: -p PAGESZ, -U UUID */ | 100 | /* TODO: -p PAGESZ, -U UUID */ |
98 | getopt32(argv, "L:", &label); | 101 | getopt32(argv, "L:", &label); |