Whamcloud - gitweb
blkid: more sanity checks for swap v1
authorEric Sandeen <sandeen@redhat.com>
Fri, 18 Apr 2008 15:28:44 +0000 (10:28 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 18 Apr 2008 18:31:27 +0000 (14:31 -0400)
commit6360d129d003f25942f62fab2cdc5e1d97cc88a6
treed7ea2911cdc379671673ccaa61f7c748da288f06
parenta4396e9d5d1351c53212bf7ff10f97edeb576438
blkid: more sanity checks for swap v1

mkswap followed by pvcreate on a block device
will still turn up as "swap" in blkid, because
pvcreate isn't particularly careful about zeroing
old signatures.  (neither is mkswap, for that matter).

Testing for appropriate version and page counts
gives us a bit more confidence that we have a
real swap (v1) partition.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/blkid/probe.c