inspection: Better checking for Windows root disks (RHBZ#729075).
authorRichard W.M. Jones <rjones@redhat.com>
Mon, 8 Aug 2011 17:52:23 +0000 (18:52 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Wed, 17 Aug 2011 12:04:37 +0000 (13:04 +0100)
commit4ee8ef480d6a3abd9e8392173ff84d9ff40558e6
tree1fa1df3db635809b5d78a7b25208610b8f6602fb
parentd1de9fcc6083e4bf19257708e0120c448c647016
inspection: Better checking for Windows root disks (RHBZ#729075).

Previously any disk that had /autoexec.bat or /boot.ini or /ntldr
would be picked up as a candidate for a Windows root disk.  If further
checking could not find any systemroot (eg. /windows) then this would
result in complete failure of inspection.

In particular, this got confused by Hp_recovery partitions which have
/autoexec.bat, but don't have a systemroot in one of the usual places
(they have /MiniNT instead).

What we do now is to properly investigate all possible systemroot
places before deciding this is a Windows systemroot, so the subsequent
failure cannot occur.

(Thanks to lorimar for reporting this bug).
(cherry picked from commit 2c57305f72cd6181d1849ae6e1b892aa01c7f844)
src/guestfs-internal.h
src/inspect_fs.c
src/inspect_fs_windows.c