diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2011-03-22 11:20:38 +0000 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2011-03-22 11:26:34 +0000 |
commit | d06fee159c14d4fe7654a02bae8849c4f82565f8 (patch) | |
tree | c20cbac89e67d1e6839e3f1162fa4aca941f4fe7 /src/inspect.c | |
parent | 5776c145d411e5ae00072ecf422055f3d0bd29e2 (diff) | |
download | libguestfs-d06fee159c14d4fe7654a02bae8849c4f82565f8.tar.gz libguestfs-d06fee159c14d4fe7654a02bae8849c4f82565f8.tar.xz libguestfs-d06fee159c14d4fe7654a02bae8849c4f82565f8.zip |
inspect: Don't fail for Windows guests with multiple disks (RHBZ#674130).
Notes
Notes:
Labels: bugfix, RHBZ#674130
Depends: 5776c145d411e5ae00072ecf422055f3d0bd29e2
Diffstat (limited to 'src/inspect.c')
-rw-r--r-- | src/inspect.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/inspect.c b/src/inspect.c index 20e88068..1129a53d 100644 --- a/src/inspect.c +++ b/src/inspect.c @@ -366,9 +366,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 || @@ -380,6 +384,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; /* Install CD/disk? Skip these checks if it's not a whole device * (eg. CD) or the first partition (eg. bootable USB key). */ |