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

Re: [libvirt] [PATCH v2 5/8] undefine: Implement internal API for libxl driver



On 07/15/2011 03:06 AM, Osier Yang wrote:
> This is just similiar as changes on qemu driver.
> 
> * src/libxl/libxl_driver.c: New callback for libxl_driver,
> new function libxlDomainUndefineFlags, and changes libxlDomainUndefine
> as a wrapper of libxlDomainUndefineFlags.
> ---
>  src/libxl/libxl_driver.c |   31 ++++++++++++++++++++++++++++++-
>  1 files changed, 30 insertions(+), 1 deletions(-)

And with the same logic bug.  :(

> +    if (virFileExists(name)) {
> +        if ((flags & VIR_DOMAIN_UNDEFINE_MANAGED_STATE) &&
> +            (unlink(name) < 0)) {
> +            libxlError(VIR_ERR_INTERNAL_ERR,
> +                       _("Failed on removing domain managed state "
> +                       "file '%s'"), name);
> +            goto cleanup;
> +        } else {
> +            libxlError(VIR_ERR_INTERNAL_ERR,
> +                       _("Refusing to undefine with managed state "
> +                       "file '%s' exists"), name);
> +            goto cleanup;
> +        }
> +    }

-- 
Eric Blake   eblake redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


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