From: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx> To match the QGA schema name (we are introducing a qemuAgentDiskInfo struct again for different purpose). Signed-off-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx> --- src/qemu/qemu_agent.c | 10 +++++----- src/qemu/qemu_agent.h | 8 ++++---- src/qemu/qemu_driver.c | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c index 230253d404..beb42449ce 100644 --- a/src/qemu/qemu_agent.c +++ b/src/qemu/qemu_agent.c @@ -1816,7 +1816,7 @@ qemuAgentSetTime(qemuAgentPtr agent, } static void -qemuAgentDiskInfoFree(qemuAgentDiskInfoPtr info) +qemuAgentDiskAddressFree(qemuAgentDiskAddressPtr info) { if (!info) return; @@ -1840,7 +1840,7 @@ qemuAgentFSInfoFree(qemuAgentFSInfoPtr info) g_free(info->fstype); for (i = 0; i < info->ndisks; i++) - qemuAgentDiskInfoFree(info->disks[i]); + qemuAgentDiskAddressFree(info->disks[i]); g_free(info->disks); g_free(info); @@ -1862,13 +1862,13 @@ qemuAgentGetFSInfoFillDisks(virJSONValuePtr jsondisks, ndisks = virJSONValueArraySize(jsondisks); if (ndisks) - fsinfo->disks = g_new0(qemuAgentDiskInfoPtr, ndisks); + fsinfo->disks = g_new0(qemuAgentDiskAddressPtr, ndisks); fsinfo->ndisks = ndisks; for (i = 0; i < fsinfo->ndisks; i++) { virJSONValuePtr jsondisk = virJSONValueArrayGet(jsondisks, i); virJSONValuePtr pci; - qemuAgentDiskInfoPtr disk; + qemuAgentDiskAddressPtr disk; const char *val; if (!jsondisk) { @@ -1879,7 +1879,7 @@ qemuAgentGetFSInfoFillDisks(virJSONValuePtr jsondisks, return -1; } - fsinfo->disks[i] = g_new0(qemuAgentDiskInfo, 1); + fsinfo->disks[i] = g_new0(qemuAgentDiskAddress, 1); disk = fsinfo->disks[i]; if ((val = virJSONValueObjectGetString(jsondisk, "bus-type"))) diff --git a/src/qemu/qemu_agent.h b/src/qemu/qemu_agent.h index 7cbab489ec..185d09aeca 100644 --- a/src/qemu/qemu_agent.h +++ b/src/qemu/qemu_agent.h @@ -67,9 +67,9 @@ typedef enum { QEMU_AGENT_SHUTDOWN_LAST, } qemuAgentShutdownMode; -typedef struct _qemuAgentDiskInfo qemuAgentDiskInfo; -typedef qemuAgentDiskInfo *qemuAgentDiskInfoPtr; -struct _qemuAgentDiskInfo { +typedef struct _qemuAgentDiskAddress qemuAgentDiskAddress; +typedef qemuAgentDiskAddress *qemuAgentDiskAddressPtr; +struct _qemuAgentDiskAddress { char *serial; virPCIDeviceAddress pci_controller; char *bus_type; @@ -88,7 +88,7 @@ struct _qemuAgentFSInfo { long long total_bytes; long long used_bytes; size_t ndisks; - qemuAgentDiskInfoPtr *disks; + qemuAgentDiskAddressPtr *disks; }; void qemuAgentFSInfoFree(qemuAgentFSInfoPtr info); diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index b69be1bedc..a8760f82b1 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -18847,7 +18847,7 @@ qemuAgentFSInfoToPublic(qemuAgentFSInfoPtr agent, ret->ndevAlias = agent->ndisks; for (i = 0; i < ret->ndevAlias; i++) { - qemuAgentDiskInfoPtr agentdisk = agent->disks[i]; + qemuAgentDiskAddressPtr agentdisk = agent->disks[i]; virDomainDiskDefPtr diskDef; diskDef = virDomainDiskByAddress(vmdef, @@ -19899,7 +19899,7 @@ qemuAgentFSInfoFormatParams(qemuAgentFSInfoPtr *fsinfo, return; for (j = 0; j < fsinfo[i]->ndisks; j++) { virDomainDiskDefPtr diskdef = NULL; - qemuAgentDiskInfoPtr d = fsinfo[i]->disks[j]; + qemuAgentDiskAddressPtr d = fsinfo[i]->disks[j]; /* match the disk to the target in the vm definition */ diskdef = virDomainDiskByAddress(vmdef, &d->pci_controller, -- 2.29.0