summaryrefslogtreecommitdiffhomepage
path: root/util-linux
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-10-15 22:43:07 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2009-10-15 22:43:07 +0200
commitf5a295d5a82297a5c13289c2e43256f20c172ddf (patch)
tree1f2a46db6d2801f1960d19f617b24fca774d37dd /util-linux
parent4ebc76c8a23367eaec29931b77e10e3ee890dd7d (diff)
util-linux/mkswap.c: fix warning
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/mkswap.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/util-linux/mkswap.c b/util-linux/mkswap.c
index 226831bba..2f7827d6f 100644
--- a/util-linux/mkswap.c
+++ b/util-linux/mkswap.c
@@ -112,19 +112,19 @@ int mkswap_main(int argc, char **argv)
// Make a header. hdr is zero-filled so far...
hdr[0] = 1;
hdr[1] = (len / pagesize) - 1;
-#if ENABLE_FEATURE_MKSWAP_UUID
- char uuid_string[32];
- generate_uuid((void*) &hdr[3]);
- bin2hex(uuid_string, (void*) &hdr[3], 16);
- /* f.e. UUID=dfd9c173-be52-4d27-99a5-c34c6c2ff55f */
- printf("UUID=%.8s" "-%.4s-%.4s-%.4s-%.12s\n",
- uuid_string,
- uuid_string+8,
- uuid_string+8+4,
- uuid_string+8+4+4,
- uuid_string+8+4+4+4
- );
-#endif
+ if (ENABLE_FEATURE_MKSWAP_UUID) {
+ char uuid_string[32];
+ generate_uuid((void*) &hdr[3]);
+ bin2hex(uuid_string, (void*) &hdr[3], 16);
+ /* f.e. UUID=dfd9c173-be52-4d27-99a5-c34c6c2ff55f */
+ printf("UUID=%.8s" "-%.4s-%.4s-%.4s-%.12s\n",
+ uuid_string,
+ uuid_string+8,
+ uuid_string+8+4,
+ uuid_string+8+4+4,
+ uuid_string+8+4+4+4
+ );
+ }
// Write the header. Sync to disk because some kernel versions check
// signature on disk (not in cache) during swapon.