From ca55a451cdfa48f7640cd2f122aa25dedbd4edf5 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 27 Apr 2010 15:15:11 +0200 Subject: mount: revert ugly ENOMEDIUM support Signed-off-by: Karel Zak --- lib/fsprobe.c | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) (limited to 'lib') 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) -- cgit v1.2.3