]> git.ipfire.org Git - thirdparty/util-linux.git/commit - libblkid/src/superblocks/superblocks.h
libblkid: detect squashfs 3 vs 4
authorRuediger Meier <ruediger.meier@ga-group.nl>
Tue, 20 May 2014 10:23:33 +0000 (10:23 +0000)
committerKarel Zak <kzak@redhat.com>
Mon, 26 May 2014 10:00:44 +0000 (12:00 +0200)
commit11402f5e0d1bf57c40a842d85728476f89f1e315
tree03a773b718b5c4b53aab9fb3f2a20ebc020d984a
parent4ea79d96903b488d2f03bce8febee73681303cd2
libblkid: detect squashfs 3 vs 4

Detect squashfs version <= 3 as squashfs3 and version >= 4 as squashfs.

squashfs kernel module version 4.0 (kernel 2.6.29) is not backward
compatible to open squashfs created with previous versions.

Also fixed version number parsing, see
$  mkdir test
$  mksquashfs test test.sqsh
$  blkid -p test.sqsh
- test.sqsh: VERSION="1024.0" TYPE="squashfs" USAGE="filesystem"
+ test.sqsh: VERSION="4.0" TYPE="squashfs" USAGE="filesystem"

This patch comes from openSUSE / SLE. Original author was probably
Miklos Szeredi.
Internal SUSE references: bnc#666893, sr226509

CC: Stanislav Brabec <sbrabec@suse.cz>
CC: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
libblkid/src/superblocks/squashfs.c
libblkid/src/superblocks/superblocks.c
libblkid/src/superblocks/superblocks.h