inspect: ignore special CD devices on FreeBSD install discs

/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.
This commit is contained in:
Pino Toscano
2013-11-28 14:48:37 +01:00
committed by Richard W.M. Jones
parent 75bf5cfebf
commit e754add14c

View File

@@ -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);