diff options
author | Hannes Reinecke | 2014-03-20 11:03:49 +0100 |
---|---|---|
committer | Karel Zak | 2014-03-20 13:43:40 +0100 |
commit | 296d96e20e565e497e9510e6ac9b71e0a0ca447d (patch) | |
tree | 02857de3a8255909f175f7c48ef3738084b71c94 /libblkid/src/blkidP.h | |
parent | include/closestream: don't wipe errno on EPIPE (diff) | |
download | kernel-qcow2-util-linux-296d96e20e565e497e9510e6ac9b71e0a0ca447d.tar.gz kernel-qcow2-util-linux-296d96e20e565e497e9510e6ac9b71e0a0ca447d.tar.xz kernel-qcow2-util-linux-296d96e20e565e497e9510e6ac9b71e0a0ca447d.zip |
blkid: stop scanning on I/O error
Whenever we fail to read from a device it's pointless to
continue with probing; we should be failing immediately.
Otherwise the system will continue logging I/O errors.
This patch updates the probe functions to return the
negative error number on error and BLKID_PROBE_NONE
if not found.
[kzak@redhat.com: - fix s/return errno/return -errno/]
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libblkid/src/blkidP.h')
-rw-r--r-- | libblkid/src/blkidP.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libblkid/src/blkidP.h b/libblkid/src/blkidP.h index 4a968d915..58a81d984 100644 --- a/libblkid/src/blkidP.h +++ b/libblkid/src/blkidP.h @@ -297,6 +297,9 @@ struct blkid_struct_cache /* old systems */ #define BLKID_CACHE_FILE_OLD "/etc/blkid.tab" +#define BLKID_PROBE_OK 0 +#define BLKID_PROBE_NONE 1 + #define BLKID_ERR_IO 5 #define BLKID_ERR_PROC 9 #define BLKID_ERR_MEM 12 |