X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=src%2Finspect.c;fp=src%2Finspect.c;h=f3cc54ef7ae4de3a4cdffe1403d40f5e27bcf63f;hb=3e549d86689893b791d2e489bd5bbf2d79c65a59;hp=09ef2b141f69cf0d548fbbdea9a364f0f6c4b762;hpb=e3bb27af94641d1bed26574724ce46df73d2340e;p=libguestfs.git diff --git a/src/inspect.c b/src/inspect.c index 09ef2b1..f3cc54e 100644 --- a/src/inspect.c +++ b/src/inspect.c @@ -353,9 +353,13 @@ check_filesystem (guestfs_h *g, const char *device) guestfs_is_dir (g, "/run") > 0 && guestfs_is_dir (g, "/spool") > 0) fs->content = FS_CONTENT_LINUX_VAR; - /* Windows root? */ + /* Windows root? + * Note that if a Windows guest has multiple disks and applications + * are installed on those other disks, then those other disks will + * contain "/Program Files" and "/System Volume Information". Those + * would *not* be Windows root disks. (RHBZ#674130) + */ else if (is_file_nocase (g, "/AUTOEXEC.BAT") > 0 || - is_dir_nocase (g, "/Program Files") > 0 || is_dir_nocase (g, "/WINDOWS") > 0 || is_dir_nocase (g, "/WIN32") > 0 || is_dir_nocase (g, "/WINNT") > 0 || @@ -366,6 +370,13 @@ check_filesystem (guestfs_h *g, const char *device) if (check_windows_root (g, fs) == -1) return -1; } + /* Windows volume with installed applications (but not root)? */ + else if (is_dir_nocase (g, "/System Volume Information") > 0 && + is_dir_nocase (g, "/Program Files") > 0) + fs->content = FS_CONTENT_WINDOWS_VOLUME_WITH_APPS; + /* Windows volume (but not root)? */ + else if (is_dir_nocase (g, "/System Volume Information") > 0) + fs->content = FS_CONTENT_WINDOWS_VOLUME; return 0; }