From: John Ferlan Date: Wed, 23 Sep 2015 20:28:30 +0000 (-0400) Subject: storage: Fix incorrect format for XML X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=5275c0f4a1267c630b5c3b77fac8cbe4fcaa3adb;p=people%2Fliuw%2Flibxenctrl-split%2Flibvirt.git storage: Fix incorrect format for XML https://bugzilla.redhat.com/show_bug.cgi?id=1256999 After creating a copy of the 'authdef' in a pool -> disk translation, unconditionally clear the 'authType' in the resulting disk auth def structure since that's used for a storage pool and not a disk. This ensures virStorageAuthDefFormat will properly format the XML for a (e.g. it won't have a ). --- diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c index ddf4405d5..0a7ebcc1c 100644 --- a/src/storage/storage_driver.c +++ b/src/storage/storage_driver.c @@ -3199,6 +3199,8 @@ virStorageTranslateDiskSourcePoolAuth(virDomainDiskDefPtr def, def->src->auth = virStorageAuthDefCopy(source->auth); if (!def->src->auth) goto cleanup; + /* A doesn't use src->auth->authType = VIR_STORAGE_AUTH_TYPE_NONE; ret = 0; cleanup: