]> 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>
Thu, 4 Feb 2010 21:19:38 +0000 (22:19 +0100)
commit88923b088948446286290651abaca31464f884a8
tree9d46df7d6459345b4cb08d7b02ef57110984f46b
parent435c73ec71b6f66269f71dac94c05e1c362a7cd8
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