[libvirt] [sandbox PATCH 02/15] Add support for InteractiveContainers to virt-sandbox-service-util

Daniel P. Berrange berrange at redhat.com
Fri Apr 5 11:04:52 UTC 2013


On Wed, Apr 03, 2013 at 07:17:20PM -0400, Dan Walsh wrote:
> We need to add support for interactive sandbox/containers for OpenShift.
> 
> This patch will create the correct container type based off the /etc/libvirt-sandbox/service/*
> ---
>  bin/virt-sandbox-service-util.c | 31 +++++++++++++++++++------------
>  1 file changed, 19 insertions(+), 12 deletions(-)
> @@ -452,16 +450,25 @@ int main(int argc, char **argv) {
>          goto cleanup;
>      }
>  
> -    cfg = GVIR_SANDBOX_CONFIG_SERVICE(config);
> +    if (GVIR_SANDBOX_IS_CONFIG_INTERACTIVE(config)) {
> +        GVirSandboxContextInteractive *service;
> +        if (!(service = gvir_sandbox_context_interactive_new(hv, GVIR_SANDBOX_CONFIG_INTERACTIVE(config)))) {
> +                g_printerr(_("Unable to create new context service: %s\n"),
> +                           err && err->message ? err->message : _("unknown"));
> +                goto cleanup;

Again your identation here is not right - 4 space indent is the norm,

> +        }
> +        ctx = GVIR_SANDBOX_CONTEXT(service);
> +    } else {
> +        GVirSandboxContextService *service;
>  
> -    if (!(service = gvir_sandbox_context_service_new(hv, cfg))) {
> -        g_printerr(_("Unable to create new context service: %s\n"),
> -                   err && err->message ? err->message : _("unknown"));
> -        goto cleanup;
> +        if (!(service = gvir_sandbox_context_service_new(hv, GVIR_SANDBOX_CONFIG_SERVICE(config)))) {
> +                g_printerr(_("Unable to create new context service: %s\n"),
> +                           err && err->message ? err->message : _("unknown"));
> +                goto cleanup;

And here


ACK if identation is fixed before pushing


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




More information about the libvir-list mailing list