aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/interop/qemu-ga.rst8
-rw-r--r--qga/commands-posix.c5
-rw-r--r--qga/commands-win32.c2
-rw-r--r--qga/main.c4
-rw-r--r--tests/unit/test-qga.c6
5 files changed, 15 insertions, 10 deletions
diff --git a/docs/interop/qemu-ga.rst b/docs/interop/qemu-ga.rst
index 461c5a3..72fb75a 100644
--- a/docs/interop/qemu-ga.rst
+++ b/docs/interop/qemu-ga.rst
@@ -81,13 +81,13 @@ Options
.. option:: -b, --block-rpcs=LIST
- Comma-separated list of RPCs to disable (no spaces, use ``help`` to
- list available RPCs).
+ Comma-separated list of RPCs to disable (no spaces, use ``--block-rpcs=help``
+ to list available RPCs).
.. option:: -a, --allow-rpcs=LIST
- Comma-separated list of RPCs to enable (no spaces, use ``help`` to
- list available RPCs).
+ Comma-separated list of RPCs to enable (no spaces, use ``--allow-rpcs=help``
+ to list available RPCs).
.. option:: -D, --dump-conf
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 <arpa/inet.h>
#include <sys/socket.h>
#include <net/if.h>
-#if defined(__NetBSD__) || defined(__OpenBSD__)
+#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(CONFIG_SOLARIS)
#include <net/if_arp.h>
#include <netinet/if_ether.h>
+#if !defined(ETHER_ADDR_LEN) && defined(ETHERADDRL)
+#define ETHER_ADDR_LEN ETHERADDRL
+#endif
#else
#include <net/ethernet.h>
#endif
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(
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"
diff --git a/tests/unit/test-qga.c b/tests/unit/test-qga.c
index 671e83c..8cddf5d 100644
--- a/tests/unit/test-qga.c
+++ b/tests/unit/test-qga.c
@@ -822,7 +822,7 @@ static void test_qga_guest_exec(gconstpointer fix)
/* exec 'echo foo bar' */
ret = qmp_fd(fixture->fd, "{'execute': 'guest-exec', 'arguments': {"
- " 'path': '/bin/echo', 'arg': [ '-n', '\" test_str \"' ],"
+ " 'path': 'echo', 'arg': [ '-n', '\" test_str \"' ],"
" 'capture-output': true } }");
g_assert_nonnull(ret);
qmp_assert_no_error(ret);
@@ -883,7 +883,7 @@ static void test_qga_guest_exec_separated(gconstpointer fix)
/* exec 'echo foo bar' */
ret = qmp_fd(fixture->fd, "{'execute': 'guest-exec', 'arguments': {"
- " 'path': '/bin/bash',"
+ " 'path': 'bash',"
" 'arg': [ '-c', 'for i in $(seq 4); do if (( $i %% 2 )); then echo stdout; else echo stderr 1>&2; fi; done;' ],"
" 'capture-output': 'separated' } }");
g_assert_nonnull(ret);
@@ -924,7 +924,7 @@ static void test_qga_guest_exec_merged(gconstpointer fix)
/* exec 'echo foo bar' */
ret = qmp_fd(fixture->fd, "{'execute': 'guest-exec', 'arguments': {"
- " 'path': '/bin/bash',"
+ " 'path': 'bash',"
" 'arg': [ '-c', 'for i in $(seq 4); do if (( $i %% 2 )); then echo stdout; else echo stderr 1>&2; fi; done;' ],"
" 'capture-output': 'merged' } }");
g_assert_nonnull(ret);