summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorKarel Zak2010-04-27 15:15:11 +0200
committerKarel Zak2010-04-27 15:15:11 +0200
commitca55a451cdfa48f7640cd2f122aa25dedbd4edf5 (patch)
tree0ceb25c91b741191c84985d0c77213fa8f614266 /lib
parentscript: preserve child exit status (diff)
downloadkernel-qcow2-util-linux-ca55a451cdfa48f7640cd2f122aa25dedbd4edf5.tar.gz
kernel-qcow2-util-linux-ca55a451cdfa48f7640cd2f122aa25dedbd4edf5.tar.xz
kernel-qcow2-util-linux-ca55a451cdfa48f7640cd2f122aa25dedbd4edf5.zip
mount: revert ugly ENOMEDIUM support
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/fsprobe.c25
1 files changed, 1 insertions, 24 deletions
diff --git a/lib/fsprobe.c b/lib/fsprobe.c
index 8eb08fac8..e92e03fc3 100644
--- a/lib/fsprobe.c
+++ b/lib/fsprobe.c
@@ -20,29 +20,6 @@
static blkid_cache blcache;
-#ifdef HAVE_LIBBLKID_INTERNAL
-/* ask kernel developers why we need such ugly open() method... */
-static int
-open_device(const char *devname)
-{
- int retries = 0;
-
- do {
- int fd = open(devname, O_RDONLY);
- if (fd >= 0)
- return fd;
- if (errno != ENOMEDIUM)
- break;
- if (retries >= CRDOM_NOMEDIUM_RETRIES)
- break;
- ++retries;
- sleep(3);
- } while(1);
-
- return -1;
-}
-#endif
-
/*
* Parses NAME=value, returns -1 on parse error, 0 success. The success is also
* when the 'spec' doesn't contain name=value pair (because the spec could be
@@ -124,7 +101,7 @@ fsprobe_get_value(const char *name, const char *devname, int *ambi)
if (!devname || !name)
return NULL;
- fd = open_device(devname);
+ fd = open(devname, O_RDONLY);
if (fd < 0)
return NULL;
if (!blprobe)