[PATCH 6/9] swaplabel: wrong version number in check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



$ swaplabel /dev/sda2
swaplabel: /dev/sda2: unsupported swap version '1'

The mkswap does not allow any other version, so swaplabel(8) must be
wrong.

Reference: https://github.com/karelzak/util-linux/blob/master/disk-utils/mkswap.c#L520
Signed-off-by: Sami Kerola <kerolasa@xxxxxx>
---
 disk-utils/swaplabel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/disk-utils/swaplabel.c b/disk-utils/swaplabel.c
index a5ccb7e..5d048aa 100644
--- a/disk-utils/swaplabel.c
+++ b/disk-utils/swaplabel.c
@@ -70,7 +70,7 @@ static blkid_probe get_swap_prober(const char *devname)
 		/* supported is SWAPSPACE2 only */
 		if (blkid_probe_lookup_value(pr, "VERSION", &version, NULL) == 0
 		    && version
-		    && strcmp(version, "2"))
+		    && strcmp(version, "1"))
 			warnx(_("%s: unsupported swap version '%s'"),
 						devname, version);
 		else
-- 
1.9.0

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux