]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Allow probing of image formats without version information
authorAdam Litke <agl@us.ibm.com>
Fri, 19 Nov 2010 16:18:15 +0000 (10:18 -0600)
committerEric Blake <eblake@redhat.com>
Fri, 19 Nov 2010 22:55:02 +0000 (15:55 -0700)
commit5a2a474ee8e7f3c3fc62abaa41943da13dfc2f76
tree573869416a31c96443eb811fa2f32c69e75d22c9
parentd2af8ffcd8b75dfb59bbe5cd214a0a082fee0465
Allow probing of image formats without version information

Disk image formats that wish to opt-out of version validation are supposed to
set versionOffset to -1 in their fileTypeInfo entry.

By unconditionally returning False for these formats,
virStorageFileMatchesVersion() incorrectly reports a version mismatch when the
test was actually skipped.  The correct behavior is to return True so these
formats can be successfully probed using the magic bytes alone.

Signed-off-by: Adam Litke <agl@us.ibm.com>
src/util/storage_file.c