From 454a08380d9de78448927ab77480f833342d214c Mon Sep 17 00:00:00 2001 From: Matthew Booth Date: Wed, 23 Nov 2011 14:00:53 +0000 Subject: [PATCH] md: Inspect MD devices --- src/inspect.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/inspect.c b/src/inspect.c index e49cb1f..f9b8298 100644 --- a/src/inspect.c +++ b/src/inspect.c @@ -91,6 +91,22 @@ guestfs__inspect_os (guestfs_h *g) } guestfs___free_string_list (partitions); + /* Look at MD devices. */ + char **mds = guestfs_list_md_devices (g); + if (mds == NULL) { + guestfs___free_inspect_info (g); + return NULL; + } + + for (i = 0; mds[i] != NULL; ++i) { + if (guestfs___check_for_filesystem_on (g, mds[i], 0, i+1) == -1) { + guestfs___free_string_list (mds); + guestfs___free_inspect_info (g); + return NULL; + } + } + guestfs___free_string_list (mds); + /* Look at all LVs. */ if (guestfs___feature_available (g, "lvm2")) { char **lvs; -- 1.8.3.1