diff options
author | Hannes Reinecke | 2014-03-20 11:03:50 +0100 |
---|---|---|
committer | Karel Zak | 2014-03-20 15:26:48 +0100 |
commit | 37f4060225df0591ab8e1dd676dbc8115d900d4f (patch) | |
tree | 47b445e8868687025b4769ada1824a5bdd2e8b8e /libblkid/src/superblocks/iso9660.c | |
parent | blkid: stop scanning on I/O error (diff) | |
download | kernel-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/iso9660.c')
-rw-r--r-- | libblkid/src/superblocks/iso9660.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libblkid/src/superblocks/iso9660.c b/libblkid/src/superblocks/iso9660.c index 148587b3b..d099467a2 100644 --- a/libblkid/src/superblocks/iso9660.c +++ b/libblkid/src/superblocks/iso9660.c @@ -100,7 +100,7 @@ static int probe_iso9660_hsfs(blkid_probe pr, const struct blkid_idmag *mag) iso = blkid_probe_get_sb(pr, mag, struct high_sierra_volume_descriptor); if (!iso) - return -1; + return errno ? -errno : 1; blkid_probe_set_version(pr, "High Sierra"); blkid_probe_set_label(pr, iso->volume_id, sizeof(iso->volume_id)); @@ -178,7 +178,7 @@ int probe_iso9660(blkid_probe pr, const struct blkid_idmag *mag) iso = blkid_probe_get_sb(pr, mag, struct iso_volume_descriptor); if (!iso) - return -1; + return errno ? -errno : 1; memcpy(label, iso->volume_id, sizeof(label)); |