[Libguestfs] [PATCH 2/3] inspect: ignore special CD devices on FreeBSD install discs

Pino Toscano ptoscano at redhat.com
Thu Nov 28 13:48:37 UTC 2013


/etc/fstab in installation discs of FreeBSD can have an entry pointing
to the mounted CD itself; skip it as it is done with other CD devices in
check_fstab.
---
 src/inspect-fs-unix.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/inspect-fs-unix.c b/src/inspect-fs-unix.c
index 8e0f135..a9e5cad 100644
--- a/src/inspect-fs-unix.c
+++ b/src/inspect-fs-unix.c
@@ -916,10 +916,15 @@ check_fstab (guestfs_h *g, struct inspect_fs *fs)
     if (spec == NULL)
       return -1;
 
-    /* Ignore /dev/fd (floppy disks) (RHBZ#642929) and CD-ROM drives. */
+    /* Ignore /dev/fd (floppy disks) (RHBZ#642929) and CD-ROM drives.
+     *
+     * /dev/iso9660/FREEBSD_INSTALL can be found in FreeBSDs installation
+     * discs.
+     */
     if ((STRPREFIX (spec, "/dev/fd") && c_isdigit (spec[7])) ||
         STREQ (spec, "/dev/floppy") ||
-        STREQ (spec, "/dev/cdrom"))
+        STREQ (spec, "/dev/cdrom") ||
+        STRPREFIX (spec, "/dev/iso9660/"))
       continue;
 
     snprintf (augpath, sizeof augpath, "%s/file", *entry);
-- 
1.8.3.1




More information about the Libguestfs mailing list