aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2019-11-06 11:56:40 +0000
committerPeter Maydell <peter.maydell@linaro.org>2019-11-06 11:56:40 +0000
commit50d2d550d75b66529f4037d1daa7f4715351bdca (patch)
tree6dc1c5c867e9446dc453ffca2ca20fcbe2d21efa
parente9102eb84dbc82ffe4bfb379a5ae233a967a900b (diff)
parent28d8dd355be98da6239bd5569721980c833df6a1 (diff)
Merge remote-tracking branch 'remotes/mdroth/tags/qga-pull-2019-11-04-tag' into staging
qemu-ga patch queue for hard-freeze * fix handling of Chinese network device names in guest-network-get-interfaces * add missing blacklist entries for guest-get-memory-block-info for w32/non-linux builds # gpg: Signature made Mon 04 Nov 2019 17:25:54 GMT # gpg: using RSA key CEACC9E15534EBABB82D3FA03353C9CEF108B584 # gpg: issuer "mdroth@linux.vnet.ibm.com" # gpg: Good signature from "Michael Roth <flukshun@gmail.com>" [full] # gpg: aka "Michael Roth <mdroth@utexas.edu>" [full] # gpg: aka "Michael Roth <mdroth@linux.vnet.ibm.com>" [full] # Primary key fingerprint: CEAC C9E1 5534 EBAB B82D 3FA0 3353 C9CE F108 B584 * remotes/mdroth/tags/qga-pull-2019-11-04-tag: qga: Add "guest-get-memory-block-info" to blacklist qga-win: network-get-interfaces command name field bug fix Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--qga/commands-posix.c3
-rw-r--r--qga/commands-win32.c12
2 files changed, 8 insertions, 7 deletions
diff --git a/qga/commands-posix.c b/qga/commands-posix.c
index dfc05f5b8a..1c1a165dae 100644
--- a/qga/commands-posix.c
+++ b/qga/commands-posix.c
@@ -2730,7 +2730,8 @@ GList *ga_command_blacklist_init(GList *blacklist)
"guest-suspend-hybrid", "guest-network-get-interfaces",
"guest-get-vcpus", "guest-set-vcpus",
"guest-get-memory-blocks", "guest-set-memory-blocks",
- "guest-get-memory-block-size", NULL};
+ "guest-get-memory-block-size", "guest-get-memory-block-info",
+ NULL};
char **p = (char **)list;
while (*p) {
diff --git a/qga/commands-win32.c b/qga/commands-win32.c
index 6b67f16faf..55ba5b263a 100644
--- a/qga/commands-win32.c
+++ b/qga/commands-win32.c
@@ -1387,12 +1387,12 @@ static IP_ADAPTER_ADDRESSES *guest_get_adapters_addresses(Error **errp)
static char *guest_wctomb_dup(WCHAR *wstr)
{
char *str;
- size_t i;
+ size_t str_size;
- i = wcslen(wstr) + 1;
- str = g_malloc(i);
- WideCharToMultiByte(CP_ACP, WC_COMPOSITECHECK,
- wstr, -1, str, i, NULL, NULL);
+ str_size = WideCharToMultiByte(CP_UTF8, 0, wstr, -1, NULL, 0, NULL, NULL);
+ /* add 1 to str_size for NULL terminator */
+ str = g_malloc(str_size + 1);
+ WideCharToMultiByte(CP_UTF8, 0, wstr, -1, str, str_size, NULL, NULL);
return str;
}
@@ -1894,7 +1894,7 @@ GList *ga_command_blacklist_init(GList *blacklist)
"guest-suspend-hybrid",
"guest-set-vcpus",
"guest-get-memory-blocks", "guest-set-memory-blocks",
- "guest-get-memory-block-size",
+ "guest-get-memory-block-size", "guest-get-memory-block-info",
NULL};
char **p = (char **)list_unsupported;