From a4317d06454daae173209204137998838c73807a Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 27 Jul 2011 21:49:01 +0100 Subject: [PATCH] Add drive mappings and Windows current control set to inspection data. --- README | 6 +----- slave.ml | 8 ++++++++ slave_types.ml | 2 ++ slave_types.mli | 2 ++ 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/README b/README index 99144f6..65f0ebc 100644 --- a/README +++ b/README @@ -8,14 +8,10 @@ script and it will tell you what's missing). ./configure make -NOTE: Versions of libguestfs earlier than the those listed below had a -bug in the OCaml bindings which can cause guestfs-browser to crash -(RHBZ#725824, git commit 2b8b3f9794ceb43eabd). If you get random -segfaults, please make sure you are using libguestfs versions: +Note these minimum versions of libguestfs: libguestfs >= 1.13.2 (on development branch) libguestfs >= 1.12.2 (on stable-1.12 branch) libguestfs >= 1.10.6 (on stable-1.10 branch) - libguestfs >= 1.8.10 (on stable-1.8 branch) Developers/contributors: Please read the "HACKING" file. diff --git a/slave.ml b/slave.ml index f72a5aa..412d183 100644 --- a/slave.ml +++ b/slave.ml @@ -531,6 +531,12 @@ and open_disk_images images cb = let oses = List.map ( fun root -> let typ = g#inspect_get_type root in + let windows_current_control_set = + if typ <> "windows" then None + else ( + try Some (g#inspect_get_windows_current_control_set root) + with G.Error _ -> None + ) in let windows_systemroot = if typ <> "windows" then None else ( @@ -546,6 +552,7 @@ and open_disk_images images cb = insp_root = root; insp_arch = g#inspect_get_arch root; insp_distro = g#inspect_get_distro root; + insp_drive_mappings = g#inspect_get_drive_mappings root; insp_filesystems = g#inspect_get_filesystems root; insp_hostname = g#inspect_get_hostname root; insp_major_version = g#inspect_get_major_version root; @@ -555,6 +562,7 @@ and open_disk_images images cb = insp_package_management = g#inspect_get_package_management root; insp_product_name = g#inspect_get_product_name root; insp_type = typ; + insp_windows_current_control_set = windows_current_control_set; insp_windows_systemroot = windows_systemroot; insp_winreg_DEFAULT = None; (* incomplete, see below *) insp_winreg_SAM = None; diff --git a/slave_types.ml b/slave_types.ml index 7af8837..ea6c75c 100644 --- a/slave_types.ml +++ b/slave_types.ml @@ -34,6 +34,7 @@ and inspection_os = { insp_root : string; insp_arch : string; insp_distro : string; + insp_drive_mappings : (string * string) list; insp_filesystems : string array; insp_hostname : string; insp_major_version : int; @@ -43,6 +44,7 @@ and inspection_os = { insp_package_management : string; insp_product_name : string; insp_type : string; + insp_windows_current_control_set : string option; insp_windows_systemroot : string option; insp_winreg_DEFAULT : string option; insp_winreg_SAM : string option; diff --git a/slave_types.mli b/slave_types.mli index e039bb6..ee897a5 100644 --- a/slave_types.mli +++ b/slave_types.mli @@ -38,6 +38,7 @@ and inspection_os = { insp_root : string; (** see {!Guestfs.inspect_os} *) insp_arch : string; insp_distro : string; + insp_drive_mappings : (string * string) list; insp_filesystems : string array; insp_hostname : string; insp_major_version : int; @@ -47,6 +48,7 @@ and inspection_os = { insp_package_management : string; insp_product_name : string; insp_type : string; + insp_windows_current_control_set : string option; insp_windows_systemroot : string option; insp_winreg_DEFAULT : string option; (* registry files *) insp_winreg_SAM : string option; -- 1.8.3.1