]> err.no Git - util-linux/commit
libblkid: don't return error on empty files
authorKarel Zak <kzak@redhat.com>
Thu, 4 Feb 2010 21:19:38 +0000 (22:19 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 16 Feb 2010 08:58:57 +0000 (09:58 +0100)
commit8c9cd53708c0aca63d9a8f507cb2eddb0478bcc7
treed214489a5fe589ce99a12a2673cbfe8a89eeab6f
parentb97560acd498a40eb6914132155a50d78f002d94
libblkid: don't return error on empty files

Currently, the library does not allow to initialize blkid_probe if the
file (or block device) is empty. The empty file is reported as an
error. That's wrong. The empty file should be interpreted as a file
without any FS or PT. It means that

blkid_do_{probe,safeprobe,fullprobe}()

have to return 1 ("nothing").

Reported-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
shlibs/blkid/src/partitions/partitions.c
shlibs/blkid/src/probe.c
shlibs/blkid/src/superblocks/superblocks.c