---
inspector/inspector.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/inspector/inspector.c b/inspector/inspector.c
index 3583c61df..30d279987 100644
--- a/inspector/inspector.c
+++ b/inspector/inspector.c
@@ -347,6 +347,7 @@ output_root (xmlTextWriterPtr xo, char *root)
char buf[32];
char *canonical_root;
size_t size;
+ int is_bsd;
XMLERROR (-1, xmlTextWriterStartElement (xo, BAD_CAST "operatingsystem"));
@@ -362,6 +363,10 @@ output_root (xmlTextWriterPtr xo, char *root)
if (STRNEQ (str, "unknown"))
XMLERROR (-1,
xmlTextWriterWriteElement (xo, BAD_CAST "name", BAD_CAST str));
+ is_bsd =
+ STREQ (str, "freebsd") ||
+ STREQ (str, "netbsd") ||
+ STREQ (str, "openbsd");
free (str);
str = guestfs_inspect_get_arch (g, root);
@@ -451,8 +456,13 @@ output_root (xmlTextWriterPtr xo, char *root)
/* We need to mount everything up in order to read out the list of
* applications and the icon, ie. everything below this point.
+ *
+ * XXX As a workaround for BSD guests, because the Linux kernel
+ * driver cannot just mount a UFS filesystem, we must disable this
+ * for all *BSD operating systems. We cannot read the apps or icon
+ * from *BSD anyway.
*/
- if (inspect_apps || inspect_icon) {
+ if ((inspect_apps || inspect_icon) && !is_bsd) {
inspect_mount_root (g, root);
if (inspect_apps)
--
2.13.2