From b68d8b677ebe1a50bf374ac18f4f80313d6a38f5 Mon Sep 17 00:00:00 2001 From: "Angel M. Villegas" Date: Fri, 13 Oct 2023 11:51:10 -0400 Subject: guest-agent: improve help for --allow-rpcs and --block-rpcs Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1757 Updates to qga help output and documentation for --allow-rpcs and --blocks-rpcs Signed-off-by: "Angel M. Villegas" Reviewed-by: Konstantin Kostiuk Signed-off-by: Konstantin Kostiuk --- qga/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'qga') diff --git a/qga/main.c b/qga/main.c index 8668b9f..bdf5344 100644 --- a/qga/main.c +++ b/qga/main.c @@ -261,9 +261,9 @@ QEMU_COPYRIGHT "\n" " -s, --service service commands: install, uninstall, vss-install, vss-uninstall\n" #endif " -b, --block-rpcs comma-separated list of RPCs to disable (no spaces,\n" -" use \"help\" to list available RPCs)\n" +" use \"--block-rpcs=help\" to list available RPCs)\n" " -a, --allow-rpcs comma-separated list of RPCs to enable (no spaces,\n" -" use \"help\" to list available RPCs)\n" +" use \"--allow-rpcs=help\" to list available RPCs)\n" " -D, --dump-conf dump a qemu-ga config file based on current config\n" " options / command-line parameters to stdout\n" " -r, --retry-path attempt re-opening path if it's unavailable or closed\n" -- cgit v1.1 From 7c4486350a79532580a37d42abdeb1dc7e4fa6c9 Mon Sep 17 00:00:00 2001 From: Peng Ji Date: Wed, 27 Dec 2023 14:32:06 +0800 Subject: qga-win: Fix guest-get-fsinfo multi-disks collection When a volume has more than one disk, all disks cannot be returned correctly because there is not enough malloced memory for disk extents, so before executing DeviceIoControl for the second time, get the correct size of the required memory space to store all disk extents. Details: https://learn.microsoft.com/en-us/windows/win32/api/winioctl/ns-winioctl-volume_disk_extents Signed-off-by: Peng Ji Reviewed-by: Konstantin Kostiuk Signed-off-by: Konstantin Kostiuk --- qga/commands-win32.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'qga') diff --git a/qga/commands-win32.c b/qga/commands-win32.c index 697c655..a101575 100644 --- a/qga/commands-win32.c +++ b/qga/commands-win32.c @@ -935,6 +935,8 @@ static GuestDiskAddressList *build_guest_disk_info(char *guid, Error **errp) DWORD last_err = GetLastError(); if (last_err == ERROR_MORE_DATA) { /* Try once more with big enough buffer */ + size = sizeof(VOLUME_DISK_EXTENTS) + + (sizeof(DISK_EXTENT) * (extents->NumberOfDiskExtents - 1)); g_free(extents); extents = g_malloc0(size); if (!DeviceIoControl( -- cgit v1.1 From b3e0f64487a4b937d871ce4ce9c259e02ec02191 Mon Sep 17 00:00:00 2001 From: Nick Briggs Date: Thu, 11 Jan 2024 14:43:22 -0500 Subject: qga: Solaris has net/if_arp.h and netinet/if_ether.h but not ETHER_ADDR_LEN Solaris has net/if_arp.h and netinet/if_ether.h rather than net/ethernet.h, but does not define ETHER_ADDR_LEN, instead providing ETHERADDRL. Signed-off-by: Nick Briggs Reviewed-by: Konstantin Kostiuk Signed-off-by: Konstantin Kostiuk --- qga/commands-posix.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'qga') diff --git a/qga/commands-posix.c b/qga/commands-posix.c index 6169bbf..26008db 100644 --- a/qga/commands-posix.c +++ b/qga/commands-posix.c @@ -45,9 +45,12 @@ #include #include #include -#if defined(__NetBSD__) || defined(__OpenBSD__) +#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(CONFIG_SOLARIS) #include #include +#if !defined(ETHER_ADDR_LEN) && defined(ETHERADDRL) +#define ETHER_ADDR_LEN ETHERADDRL +#endif #else #include #endif -- cgit v1.1