[libvirt] [sandbox 0/2] virt-sandbox-config minor fixes

Hi all, Here are two really trivial patches, one adding image format guess to -m host-image in the same way we do it for --disk, and one fixing some code formatting issue. Cédric Bosdonnat (2): Try guessing host-image image format Code formatting fix libvirt-sandbox/libvirt-sandbox-config.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) -- 2.1.4

--- 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

On Sat, Nov 07, 2015 at 03:58:59PM -0800, Cédric Bosdonnat wrote:
--- libvirt-sandbox/libvirt-sandbox-config.c | 2 ++ 1 file changed, 2 insertions(+)
ACK Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

--- libvirt-sandbox/libvirt-sandbox-config.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/libvirt-sandbox/libvirt-sandbox-config.c b/libvirt-sandbox/libvirt-sandbox-config.c index 55ee291..0ade178 100644 --- a/libvirt-sandbox/libvirt-sandbox-config.c +++ b/libvirt-sandbox/libvirt-sandbox-config.c @@ -1381,11 +1381,8 @@ gboolean gvir_sandbox_config_add_disk_opts(GVirSandboxConfig *config, _("Unknown disk image format: '%s'"), formatStr + 7); return FALSE; } - } - else { - if ((format = gvir_sandbox_util_guess_image_format(source, error)) < 0) { - format = GVIR_CONFIG_DOMAIN_DISK_FORMAT_RAW; - } + } else if ((format = gvir_sandbox_util_guess_image_format(source, error)) < 0) { + format = GVIR_CONFIG_DOMAIN_DISK_FORMAT_RAW; } -- 2.1.4

On Sat, Nov 07, 2015 at 03:59:00PM -0800, Cédric Bosdonnat wrote:
--- libvirt-sandbox/libvirt-sandbox-config.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/libvirt-sandbox/libvirt-sandbox-config.c b/libvirt-sandbox/libvirt-sandbox-config.c index 55ee291..0ade178 100644 --- a/libvirt-sandbox/libvirt-sandbox-config.c +++ b/libvirt-sandbox/libvirt-sandbox-config.c @@ -1381,11 +1381,8 @@ gboolean gvir_sandbox_config_add_disk_opts(GVirSandboxConfig *config, _("Unknown disk image format: '%s'"), formatStr + 7); return FALSE; } - } - else { - if ((format = gvir_sandbox_util_guess_image_format(source, error)) < 0) { - format = GVIR_CONFIG_DOMAIN_DISK_FORMAT_RAW; - } + } else if ((format = gvir_sandbox_util_guess_image_format(source, error)) < 0) { + format = GVIR_CONFIG_DOMAIN_DISK_FORMAT_RAW; }
ACK Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
participants (2)
-
Cédric Bosdonnat
-
Daniel P. Berrange