← Commit list

4fc5ec56f

Denys Vlasenko
Denys Vlasenko
2009-06-27
FAILED Duration: 31s

Subject

device matching against UUIDs: do not try floppies

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

util-linux/volume_id/get_devname.c+7 -0
@@ -86,9 +86,16 @@ uuidcache_check_device(const char *device,
char *label = label;
int fd;
+ /* note: this check rejects links to devices, among other nodes */
if (!S_ISBLK(statbuf->st_mode))
return TRUE;
+ /* Users report that mucking with floppies (especially non-present
+ * ones) is significant PITA. This is a horribly dirty hack,
+ * but it is very useful in real world. */
+ if (major(statbuf->st_rdev) == 2)
+ return TRUE;
+
fd = open(device, O_RDONLY);
if (fd < 0)
return TRUE;