[libvirt] [sandbox 1/2] Try guessing host-image image format

Cédric Bosdonnat cbosdonnat at suse.com
Sat Nov 7 23:58:59 UTC 2015


---
 libvirt-sandbox/libvirt-sandbox-config.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libvirt-sandbox/libvirt-sandbox-config.c b/libvirt-sandbox/libvirt-sandbox-config.c
index 5a4aacb..55ee291 100644
--- a/libvirt-sandbox/libvirt-sandbox-config.c
+++ b/libvirt-sandbox/libvirt-sandbox-config.c
@@ -1621,6 +1621,8 @@ gboolean gvir_sandbox_config_add_mount_opts(GVirSandboxConfig *config,
                 g_type_class_unref(enum_class);
                 format = enum_value->value;
             }
+        } else if ((format = gvir_sandbox_util_guess_image_format(source, error)) < 0) {
+            format = GVIR_CONFIG_DOMAIN_DISK_FORMAT_RAW;
         }
 
         mnt = GVIR_SANDBOX_CONFIG_MOUNT(g_object_new(type,
-- 
2.1.4




More information about the libvir-list mailing list