X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=src%2Finspect_fs.c;h=25bb492c227cc51d76642d751199d1c6d2e634ea;hb=c81a16a4e2e703d0aaa595151602bcf03430f6ab;hp=68e2ddb7083c3eacd1ba7cbd4f1cc47aace38b1f;hpb=05a8359c7cf98fdcf75628299dd3e64401f07ee4;p=libguestfs.git diff --git a/src/inspect_fs.c b/src/inspect_fs.c index 68e2ddb..25bb492 100644 --- a/src/inspect_fs.c +++ b/src/inspect_fs.c @@ -190,6 +190,23 @@ check_filesystem (guestfs_h *g, const char *device, if (guestfs___check_freebsd_root (g, fs) == -1) return -1; } + else if (is_dir_etc && + is_dir_bin && + guestfs_is_file (g, "/etc/fstab") > 0 && + guestfs_is_file (g, "/etc/release") > 0) { + /* Ignore /dev/sda1 which is a shadow of the real root filesystem + * that is probably /dev/sda5 (see: + * http://www.freebsd.org/doc/handbook/disk-organization.html) + */ + if (match (g, device, re_first_partition)) + return 0; + + fs->is_root = 1; + fs->content = FS_CONTENT_NETBSD_ROOT; + fs->format = OS_FORMAT_INSTALLED; + if (guestfs___check_netbsd_root (g, fs) == -1) + return -1; + } /* Linux root? */ else if (is_dir_etc && is_dir_bin &&