summaryrefslogtreecommitdiffstats
path: root/src/inspect_fs_windows.c
Commit message (Collapse)AuthorAgeFilesLines
* inspection: Fix calls to case_sensitive_path (RHBZ#858126).Richard W.M. Jones2012-10-011-14/+27
| | | | | | | | | | | | | | | | | | | | | | | | Don't assume that if guestfs_case_sensitive_path returns NULL, that it means the file does not exist. The (previously undefined) behaviour of case_sensitive_path was that a NULL return meant "either the file doesn't exist or some other error". However in commit 973581780d8a006f336684fef6762801402d775d this was changed so that if the last element of the path didn't exist, it was assumed to be a new file and the (non-NULL) path of the new file is returned. This change breaks code (including in libguestfs) which tries to use case_sensitive_path as a dual-purpose call to fix-up a path for Windows and test if the file exists. Such code should be rewritten so that it explicitly tests for file existence after calling case_sensitive_path. I examined all the calls to case_sensitive_path in libguestfs and modified them where necessary. Cherry picked from commit 9ea6e9701461e594033999150f930cc4fafec4d2. (cherry picked from commit ff610469fb8ad1d27dac5d3cb2f1e007d8c0ecc7)
* Mac OS X: Added check of #include <endian.h>Masami HIRATA2012-08-051-0/+3
| | | | | | | Mac OS X doesn't have endian.h Signed-off-by: Masami HIRATA <msmhrt@gmail.com> (cherry picked from commit 6e3f8d2511a63bdcfa7c7d0e5414d5643c4ff599)
* inspect: Ignore missing HKLM\SYSTEM\MountedDevices (RHBZ#803664).Richard W.M. Jones2012-03-161-4/+6
| | | | | | | When a Windows guest doesn't have a HKLM\SYSTEM\MountedDevices node, inspection fails. However inspection should not completely fail just because we cannot get the drive letter mapping from a guest. (cherry picked from commit 91cede3465cd2496a01a89d5c8815df7c326c2ec)
* lib: Remove some unused variables.Richard W.M. Jones2012-03-131-1/+1
| | | | (cherry picked from commit cd3f2986eee8dbadc8253d4c3462f7e214f1236d)
* Tempus fugit.Richard W.M. Jones2012-01-181-1/+1
| | | | Update all copyright dates to 2012.
* Allow compilation without hivex (RHBZ#723474).Richard W.M. Jones2011-10-211-2/+2
|
* inspection: Better checking for Windows root disks (RHBZ#729075).Richard W.M. Jones2011-08-081-9/+63
| | | | | | | | | | | | | | | | | 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).
* Require PCRE library.Richard W.M. Jones2011-07-251-4/+2
| | | | This library is widely available in distros.
* Change download_to_tmp so it can work with multi-root operating systems.Richard W.M. Jones2011-06-281-16/+13
| | | | | | | | | | | | | | | | The previous guestfs___download_to_tmp function did not handle multiboot correctly. In particular it used the same cache name for downloaded files from different roots, which could have caused things like applications in each root to be confused. This changes the function so that the cache filename is prefixed with the root / fs number, eg. $tmpdir/0-Name instead of $tmpdir/Name. This change also requires the function to return the new name, so all places in the code which called this function had to be updated. This updates and fixes commit 3c1f762abed92f7a358f3bc93e3396d0606b18ad.
* inspect: Split code into separate files.Richard W.M. Jones2011-04-141-0/+535
The src/inspect.c file had grown rather large -- 3,500 lines. Split it across several files according to function. This is just moving code. After the split the files are more evenly divided: 536 src/inspect_apps.c 766 src/inspect.c 537 src/inspect_fs.c 404 src/inspect_fs_cd.c 785 src/inspect_fs_unix.c 535 src/inspect_fs_windows.c 3563 total