[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] Fix virsh migrateuri handling



On Thu, Jan 29, 2009 at 07:37:25PM -0800, john levon sun com wrote:
> # HG changeset patch
> # User john levon sun com
> # Date 1233286638 28800
> # Node ID 0934f4c2e1d446b1902d9ffcf14febf964af1e6a
> # Parent  6ee939f57a02bf9d332f094e07180e0149e85924
> Fix virsh migrateuri handling
> 
> Signed-off-by: John Levon <john levon sun com>
> 
> diff --git a/src/virsh.c b/src/virsh.c
> --- a/src/virsh.c
> +++ b/src/virsh.c
> @@ -2254,11 +2254,9 @@ cmdMigrate (vshControl *ctl, const vshCm
>          goto done;
>      }
>  
> -    migrateuri = vshCommandOptString (cmd, "migrateuri", &found);
> -    if (!found) migrateuri = NULL;
> -
> -    dname = vshCommandOptString (cmd, "dname", &found);
> -    if (!found) migrateuri = dname;
> +    migrateuri = vshCommandOptString (cmd, "migrateuri", NULL);
> +
> +    dname = vshCommandOptString (cmd, "dname", NULL);

Urgh, took me a while to understand  what was going wrong there - a
little bizzarre contract for vshCommandOptString!

ACK to this

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]