summaryrefslogtreecommitdiffstats
path: root/libblkid/src/superblocks/ntfs.c
diff options
context:
space:
mode:
authorHannes Reinecke2014-03-20 11:03:50 +0100
committerKarel Zak2014-03-20 15:26:48 +0100
commit37f4060225df0591ab8e1dd676dbc8115d900d4f (patch)
tree47b445e8868687025b4769ada1824a5bdd2e8b8e /libblkid/src/superblocks/ntfs.c
parentblkid: stop scanning on I/O error (diff)
downloadkernel-qcow2-util-linux-37f4060225df0591ab8e1dd676dbc8115d900d4f.tar.gz
kernel-qcow2-util-linux-37f4060225df0591ab8e1dd676dbc8115d900d4f.tar.xz
kernel-qcow2-util-linux-37f4060225df0591ab8e1dd676dbc8115d900d4f.zip
blkid: convert superblocks to new calling convention
With the previous patch the scanning functions were modified to return a differentiated return code. To correctly abort scanning when an I/O error occurs we need to differentiate between 'error' (= -1) and 'not found' (= 1) in the probe functions. This patch updates all superblock scanning functions to the new calling convention. Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libblkid/src/superblocks/ntfs.c')
-rw-r--r--libblkid/src/superblocks/ntfs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libblkid/src/superblocks/ntfs.c b/libblkid/src/superblocks/ntfs.c
index d767cb46d..41eab26e9 100644
--- a/libblkid/src/superblocks/ntfs.c
+++ b/libblkid/src/superblocks/ntfs.c
@@ -91,7 +91,7 @@ static int probe_ntfs(blkid_probe pr, const struct blkid_idmag *mag)
ns = blkid_probe_get_sb(pr, mag, struct ntfs_super_block);
if (!ns)
- return -1;
+ return errno ? -errno : 1;
/*
* Check bios parameters block
@@ -158,7 +158,7 @@ static int probe_ntfs(blkid_probe pr, const struct blkid_idmag *mag)
buf_mft = blkid_probe_get_buffer(pr, off, mft_record_size);
if (!buf_mft)
- return 1;
+ return errno ? -errno : 1;
if (memcmp(buf_mft, "FILE", 4))
return 1;
@@ -167,7 +167,7 @@ static int probe_ntfs(blkid_probe pr, const struct blkid_idmag *mag)
buf_mft = blkid_probe_get_buffer(pr, off, mft_record_size);
if (!buf_mft)
- return 1;
+ return errno ? -errno : 1;
if (memcmp(buf_mft, "FILE", 4))
return 1;