summaryrefslogtreecommitdiffstats
path: root/libblkid/src/superblocks/zfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'libblkid/src/superblocks/zfs.c')
-rw-r--r--libblkid/src/superblocks/zfs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libblkid/src/superblocks/zfs.c b/libblkid/src/superblocks/zfs.c
index fb86aec77..406ba2be8 100644
--- a/libblkid/src/superblocks/zfs.c
+++ b/libblkid/src/superblocks/zfs.c
@@ -185,7 +185,7 @@ static int probe_zfs(blkid_probe pr,
blkid_probe_get_buffer(pr, offset,
sizeof(struct zfs_uberblock));
if (ub == NULL)
- return -1;
+ return errno ? -errno : 1;
if (ub->ub_magic == UBERBLOCK_MAGIC) {
ub_offset = offset;
@@ -202,7 +202,7 @@ static int probe_zfs(blkid_probe pr,
}
if (found < 4)
- return -1;
+ return 1;
/* If we found the 4th uberblock, then we will have exited from the
* scanning loop immediately, and ub will be a valid uberblock. */
@@ -214,7 +214,7 @@ static int probe_zfs(blkid_probe pr,
if (blkid_probe_set_magic(pr, ub_offset,
sizeof(ub->ub_magic),
(unsigned char *) &ub->ub_magic))
- return -1;
+ return 1;
return 0;
}