summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2010-10-26 09:56:55 +0100
committerRichard W.M. Jones <rjones@redhat.com>2010-10-27 10:59:45 +0100
commit99dc2a9702e6c8a2bf9073af4cbf1803417ec3ee (patch)
tree27998c6be118f360c10b033ffe00e6f21580843a
parentf48cd1f262312ad278a293a20ab442dcfc076a69 (diff)
downloadlibguestfs-99dc2a9702e6c8a2bf9073af4cbf1803417ec3ee.tar.gz
libguestfs-99dc2a9702e6c8a2bf9073af4cbf1803417ec3ee.tar.xz
libguestfs-99dc2a9702e6c8a2bf9073af4cbf1803417ec3ee.zip
inspection: Ignore floppy disks and CD-ROM drives (RHBZ#642929).
-rw-r--r--src/inspect.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/inspect.c b/src/inspect.c
index 3ffb2bd0..992573a6 100644
--- a/src/inspect.c
+++ b/src/inspect.c
@@ -31,6 +31,7 @@
#include <hivex.h>
#include <augeas.h>
+#include "c-ctype.h"
#include "ignore-value.h"
#include "xstrtol.h"
@@ -831,6 +832,12 @@ add_fstab_entry (guestfs_h *g, struct inspect_fs *fs,
STREQ (mp, "/sys"))
return 0;
+ /* Ignore /dev/fd (floppy disks) (RHBZ#642929) and CD-ROM drives. */
+ if ((STRPREFIX (spec, "/dev/fd") && c_isdigit (spec[7])) ||
+ STREQ (spec, "/dev/floppy") ||
+ STREQ (spec, "/dev/cdrom"))
+ return 0;
+
/* Resolve UUID= and LABEL= to the actual device. */
char *device = NULL;
if (STRPREFIX (spec, "UUID="))