From: zhanghailiang <zhang.zhanghailiang@huawei.com>
To: qemu-devel@nongnu.org
Cc: zhanghailiang <zhang.zhanghailiang@huawei.com>,
peter.huangpeng@huawei.com, mdroth@linux.vnet.ibm.com,
lcapitulino@redhat.com, lersek@redhat.com,
lilei@linux.vnet.ibm.com
Subject: [Qemu-devel] [RFC PATCH 1/2] qga: Introduce guest-get-os-version command with stubs
Date: Tue, 16 Dec 2014 15:30:37 +0800 [thread overview]
Message-ID: <1418715038-4664-2-git-send-email-zhang.zhanghailiang@huawei.com> (raw)
In-Reply-To: <1418715038-4664-1-git-send-email-zhang.zhanghailiang@huawei.com>
Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
---
qga/commands-posix.c | 7 +++++++
qga/commands-win32.c | 6 ++++++
qga/qapi-schema.json | 26 ++++++++++++++++++++++++++
3 files changed, 39 insertions(+)
diff --git a/qga/commands-posix.c b/qga/commands-posix.c
index f6f3e3c..b4d5c29 100644
--- a/qga/commands-posix.c
+++ b/qga/commands-posix.c
@@ -1912,6 +1912,12 @@ int64_t qmp_guest_set_vcpus(GuestLogicalProcessorList *vcpus, Error **errp)
#endif
+struct GuestOSVersion *qmp_guest_get_os_version(Error **errp)
+{
+ error_set(errp, QERR_UNSUPPORTED);
+ return NULL;
+}
+
#if !defined(CONFIG_FSFREEZE)
GuestFilesystemInfoList *qmp_guest_get_fsinfo(Error **errp)
@@ -1993,6 +1999,7 @@ GList *ga_command_blacklist_init(GList *blacklist)
blacklist = g_list_append(blacklist, (char *)"guest-fstrim");
#endif
+ blacklist = g_list_append(blacklist, (char *)"guest-get-os-version");
return blacklist;
}
diff --git a/qga/commands-win32.c b/qga/commands-win32.c
index 3bcbeae..d133082 100644
--- a/qga/commands-win32.c
+++ b/qga/commands-win32.c
@@ -446,6 +446,12 @@ int64_t qmp_guest_set_vcpus(GuestLogicalProcessorList *vcpus, Error **errp)
return -1;
}
+struct GuestOSVersion *qmp_guest_get_os_version(Error **errp)
+{
+ error_set(errp, QERR_UNSUPPORTED);
+ return NULL;
+}
+
/* add unsupported commands to the blacklist */
GList *ga_command_blacklist_init(GList *blacklist)
{
diff --git a/qga/qapi-schema.json b/qga/qapi-schema.json
index 376e79f..f94404d 100644
--- a/qga/qapi-schema.json
+++ b/qga/qapi-schema.json
@@ -738,3 +738,29 @@
##
{ 'command': 'guest-get-fsinfo',
'returns': ['GuestFilesystemInfo'] }
+##
+# @GuestOSVersion:
+#
+# @name: system version.
+#
+# @:type: 64-bit or 32-bit.
+#
+# Since: 2.3
+##
+{ 'type': 'GuestOSVersion',
+ 'data': {'name': 'str', 'type': 'int'} }
+
+##
+# @guest-get-os-version:
+#
+# Get the guest's operating system version and bit.
+#
+# This is a read-only operation.
+#
+# Returns: version
+#
+# Since: 2.3
+##
+{ 'command': 'guest-get-os-version',
+ 'returns': 'GuestOSVersion' }
+
--
1.7.12.4
next prev parent reply other threads:[~2014-12-16 7:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-16 7:30 [Qemu-devel] [RFC PATCH 0/2] qga: add guest-get-os-version for windows zhanghailiang
2014-12-16 7:30 ` zhanghailiang [this message]
2014-12-16 16:23 ` [Qemu-devel] [RFC PATCH 1/2] qga: Introduce guest-get-os-version command with stubs Eric Blake
2015-01-03 0:32 ` Richard W.M. Jones
2014-12-16 7:30 ` [Qemu-devel] [RFC PATCH 2/2] qga: implement qmp_guest_get_os_version for windows zhanghailiang
2014-12-16 11:48 ` Yan Vugenfirer
2014-12-16 16:26 ` Eric Blake
2014-12-17 8:14 ` zhanghailiang
2014-12-16 9:38 ` [Qemu-devel] [RFC PATCH 0/2] qga: add guest-get-os-version " Yan Vugenfirer
2014-12-16 11:06 ` zhanghailiang
2014-12-16 16:25 ` Eric Blake
2014-12-17 8:12 ` zhanghailiang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1418715038-4664-2-git-send-email-zhang.zhanghailiang@huawei.com \
--to=zhang.zhanghailiang@huawei.com \
--cc=lcapitulino@redhat.com \
--cc=lersek@redhat.com \
--cc=lilei@linux.vnet.ibm.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=peter.huangpeng@huawei.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).