diff options
author | Karel Zak <kzak@redhat.com> | 2010-04-27 15:15:11 +0200 |
---|---|---|
committer | Karel Zak <kzak@redhat.com> | 2010-04-27 15:15:11 +0200 |
commit | ca55a451cdfa48f7640cd2f122aa25dedbd4edf5 (patch) | |
tree | 0ceb25c91b741191c84985d0c77213fa8f614266 /lib | |
parent | f1014a4f33b67ccd15baff4d07fbb09f5660028b (diff) | |
download | util-linux-old-ca55a451cdfa48f7640cd2f122aa25dedbd4edf5.tar.gz |
mount: revert ugly ENOMEDIUM support
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/fsprobe.c | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/lib/fsprobe.c b/lib/fsprobe.c index 8eb08fac..e92e03fc 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) |