diff options
author | Karel Zak | 2014-01-17 14:33:31 +0100 |
---|---|---|
committer | Karel Zak | 2014-01-17 15:01:49 +0100 |
commit | a0b42dc3696247de5c1da09b78be55908c7f9d86 (patch) | |
tree | 6107c1e221dd9718e0315990da64d87e97e36586 /disk-utils | |
parent | libblkid: no more probe for btrfs backup superblock (diff) | |
download | kernel-qcow2-util-linux-a0b42dc3696247de5c1da09b78be55908c7f9d86.tar.gz kernel-qcow2-util-linux-a0b42dc3696247de5c1da09b78be55908c7f9d86.tar.xz kernel-qcow2-util-linux-a0b42dc3696247de5c1da09b78be55908c7f9d86.zip |
mkswap: fix compiler warning [-Wunused-variable]
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'disk-utils')
-rw-r--r-- | disk-utils/mkswap.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/disk-utils/mkswap.c b/disk-utils/mkswap.c index 71503f446..a2c6529bd 100644 --- a/disk-utils/mkswap.c +++ b/disk-utils/mkswap.c @@ -399,7 +399,6 @@ wipe_device(int fd, const char *devname, int force) * Wipe boodbits */ char buf[1024]; - const char *data = NULL; if (lseek(fd, 0, SEEK_SET) != 0) errx(EXIT_FAILURE, _("unable to rewind swap-device")); @@ -419,6 +418,8 @@ wipe_device(int fd, const char *devname, int force) blkid_probe_set_superblocks_flags(pr, BLKID_SUBLKS_MAGIC|BLKID_SUBLKS_TYPE); while (blkid_do_probe(pr) == 0) { + const char *data = NULL; + if (blkid_probe_lookup_value(pr, "TYPE", &data, NULL) == 0 && data) warnx(_("%s: warning: wiping old %s signature."), devname, data); blkid_do_wipe(pr, 0); |