Displaying 1 result from an estimated 1 matches for "qemudomainattachdevicepersist".
2011 Feb 23
0
[PATCH 1/2] libvirt/qemu : allow persistent modification of disks via A(De)ttachDeviceFlags
...i = 0; i < vmdef->ndisks; i++) {
+ vdisk = vmdef->disks[i];
+ if (!strcmp(vdisk->dst, name))
+ return i;
+ }
+ return -1;
+}
+/*
+ * Attach a device given by XML, the change will be persistent
+ * and domain XML definition file is updated.
+ */
+static int qemuDomainAttachDevicePersistent(virDomainDefPtr vmdef,
+ virDomainDeviceDefPtr newdev)
+{
+ virDomainDiskDefPtr disk;
+
+ /* At first, check device confliction */
+ switch(newdev->type) {
+ case VIR_DOMAIN_DEVICE_DISK:
+ disk = newdev->data.disk;
+ if (...