diff options
-rw-r--r-- | util-linux/volume_id/get_devname.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/util-linux/volume_id/get_devname.c b/util-linux/volume_id/get_devname.c index ac69f78c4..181b6db7e 100644 --- a/util-linux/volume_id/get_devname.c +++ b/util-linux/volume_id/get_devname.c | |||
@@ -86,9 +86,16 @@ uuidcache_check_device(const char *device, | |||
86 | char *label = label; | 86 | char *label = label; |
87 | int fd; | 87 | int fd; |
88 | 88 | ||
89 | /* note: this check rejects links to devices, among other nodes */ | ||
89 | if (!S_ISBLK(statbuf->st_mode)) | 90 | if (!S_ISBLK(statbuf->st_mode)) |
90 | return TRUE; | 91 | return TRUE; |
91 | 92 | ||
93 | /* Users report that mucking with floppies (especially non-present | ||
94 | * ones) is significant PITA. This is a horribly dirty hack, | ||
95 | * but it is very useful in real world. */ | ||
96 | if (major(statbuf->st_rdev) == 2) | ||
97 | return TRUE; | ||
98 | |||
92 | fd = open(device, O_RDONLY); | 99 | fd = open(device, O_RDONLY); |
93 | if (fd < 0) | 100 | if (fd < 0) |
94 | return TRUE; | 101 | return TRUE; |