[libvirt] [PATCH 6/8] UndefineFlags: Implement libxl driver handling
Eric Blake
eblake at redhat.com
Wed Jul 13 18:02:42 UTC 2011
On 07/13/2011 04:19 AM, Osier Yang wrote:
> ---
> src/libxl/libxl_driver.c | 32 ++++++++++++++++++++++++++++----
> 1 files changed, 28 insertions(+), 4 deletions(-)
>
> diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
> index 808480f..f04931b 100644
> --- a/src/libxl/libxl_driver.c
> +++ b/src/libxl/libxl_driver.c
> @@ -220,10 +220,8 @@ libxlDoNodeGetInfo(libxlDriverPrivatePtr driver, virNodeInfoPtr info)
> static char *
> libxlDomainManagedSavePath(libxlDriverPrivatePtr driver, virDomainObjPtr vm) {
> char *ret;
> - char uuidstr[VIR_UUID_STRING_BUFLEN];
> - virUUIDFormat(vm->def->uuid, uuidstr);
>
> - if (virAsprintf(&ret, "%s/%s.save", driver->saveDir, uuidstr) < 0) {
> + if (virAsprintf(&ret, "%s/%s.save", driver->saveDir, vm->def->name) < 0) {
Same rebase problem as in 5/8.
> +
> + if (flags & VIR_DOMAIN_UNDEFINE_MANAGED_STATE) {
> + name = libxlDomainManagedSavePath(driver, vm);
> +
> + if (name == NULL)
> + goto cleanup;
> +
> + if (virFileExists(name) && (unlink(name) < 0)) {
> + libxlError(VIR_ERR_INTERNAL_ERROR,
> + _("failed on removing domain managed state "
> + "file '%s'"), name);
> + goto cleanup;
> + }
> + }
Same logic problem as in 5/8.
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110713/cd41d43b/attachment-0001.sig>
More information about the libvir-list
mailing list