diff options
-rw-r--r-- | util-linux/mkswap.c | 26 |
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) | |||
112 | // Make a header. hdr is zero-filled so far... | 112 | // Make a header. hdr is zero-filled so far... |
113 | hdr[0] = 1; | 113 | hdr[0] = 1; |
114 | hdr[1] = (len / pagesize) - 1; | 114 | hdr[1] = (len / pagesize) - 1; |
115 | #if ENABLE_FEATURE_MKSWAP_UUID | 115 | if (ENABLE_FEATURE_MKSWAP_UUID) { |
116 | char uuid_string[32]; | 116 | char uuid_string[32]; |
117 | generate_uuid((void*) &hdr[3]); | 117 | generate_uuid((void*) &hdr[3]); |
118 | bin2hex(uuid_string, (void*) &hdr[3], 16); | 118 | bin2hex(uuid_string, (void*) &hdr[3], 16); |
119 | /* f.e. UUID=dfd9c173-be52-4d27-99a5-c34c6c2ff55f */ | 119 | /* f.e. UUID=dfd9c173-be52-4d27-99a5-c34c6c2ff55f */ |
120 | printf("UUID=%.8s" "-%.4s-%.4s-%.4s-%.12s\n", | 120 | printf("UUID=%.8s" "-%.4s-%.4s-%.4s-%.12s\n", |
121 | uuid_string, | 121 | uuid_string, |
122 | uuid_string+8, | 122 | uuid_string+8, |
123 | uuid_string+8+4, | 123 | uuid_string+8+4, |
124 | uuid_string+8+4+4, | 124 | uuid_string+8+4+4, |
125 | uuid_string+8+4+4+4 | 125 | uuid_string+8+4+4+4 |
126 | ); | 126 | ); |
127 | #endif | 127 | } |
128 | 128 | ||
129 | // Write the header. Sync to disk because some kernel versions check | 129 | // Write the header. Sync to disk because some kernel versions check |
130 | // signature on disk (not in cache) during swapon. | 130 | // signature on disk (not in cache) during swapon. |