22.03.2016 16:56, Nikolay Shirokovskiy пишет:
We want to report boot order in dumpxml for vz domains.
Thus we want disks devices to be sorted in output compatible with boot
ordering specification. So let's just use virDomainDiskInsert
which makes appropriate sorting.
Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@xxxxxxxxxxxxx>
---
src/vz/vz_sdk.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c
index 528a253..f059a8e 100644
--- a/src/vz/vz_sdk.c
+++ b/src/vz/vz_sdk.c
@@ -663,7 +663,7 @@ prlsdkAddDomainHardDisksInfo(vzConnPtr privconn, PRL_HANDLE sdkdom, virDomainDef
if (prlsdkGetDiskInfo(privconn, hdd, disk, false, IS_CT(def)) < 0)
goto error;
- if (VIR_APPEND_ELEMENT(def->disks, def->ndisks, disk) < 0)
+ if (virDomainDiskInsert(def, disk) < 0)
goto error;
disk = NULL;
@@ -706,7 +706,7 @@ prlsdkAddDomainOpticalDisksInfo(vzConnPtr privconn, PRL_HANDLE sdkdom, virDomain
PrlHandle_Free(cdrom);
cdrom = PRL_INVALID_HANDLE;
- if (VIR_APPEND_ELEMENT(def->disks, def->ndisks, disk) < 0)
+ if (virDomainDiskInsert(def, disk) < 0)
goto error;
}
ACK
--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list