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

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

 



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@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]