[Libguestfs] [PATCH] inspect: ignore /dev/cdN devices in /etc/fstab

Pino Toscano ptoscano at redhat.com
Wed Feb 22 17:37:46 UTC 2017


Non-Linux Unix guests may have static devices for CDs, so make sure to
skip them when reading /etc/fstab.  This is the same as done for
/dev/fdN devices, i.e. floppy devices.
---
 lib/inspect-fs-unix.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/inspect-fs-unix.c b/lib/inspect-fs-unix.c
index 7e940d6..9b6bfbf 100644
--- a/lib/inspect-fs-unix.c
+++ b/lib/inspect-fs-unix.c
@@ -1305,6 +1305,7 @@ check_fstab (guestfs_h *g, struct inspect_fs *fs)
      * discs.
      */
     if ((STRPREFIX (spec, "/dev/fd") && c_isdigit (spec[7])) ||
+        (STRPREFIX (spec, "/dev/cd") && c_isdigit (spec[7])) ||
         STREQ (spec, "/dev/floppy") ||
         STREQ (spec, "/dev/cdrom") ||
         STRPREFIX (spec, "/dev/iso9660/"))
-- 
2.9.3




More information about the Libguestfs mailing list