qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v3 4/7] fixup! qga: add ssh-{add,remove}-authorized-keys


From: marcandre . lureau
Subject: [PATCH v3 4/7] fixup! qga: add ssh-{add,remove}-authorized-keys
Date: Tue, 20 Oct 2020 12:12:54 +0400

From: Marc-André Lureau <marcandre.lureau@redhat.com>

Use 'if' condition, as suggested by E. Blake.
---
 qga/commands-win32.c | 12 ------------
 qga/qapi-schema.json |  6 ++++--
 2 files changed, 4 insertions(+), 14 deletions(-)

diff --git a/qga/commands-win32.c b/qga/commands-win32.c
index 1e188b03d3..0c3c05484f 100644
--- a/qga/commands-win32.c
+++ b/qga/commands-win32.c
@@ -2457,15 +2457,3 @@ GuestDeviceInfoList *qmp_guest_get_devices(Error **errp)
     }
     return head;
 }
-
-void qmp_guest_ssh_add_authorized_keys(const char *username,
-                                       strList *keys, Error **errp)
-{
-    error_setg(errp, QERR_UNSUPPORTED);
-}
-
-void qmp_guest_ssh_remove_authorized_keys(const char *username,
-                                          strList *keys, Error **errp)
-{
-    error_setg(errp, QERR_UNSUPPORTED);
-}
diff --git a/qga/qapi-schema.json b/qga/qapi-schema.json
index 361883f870..90615f95d4 100644
--- a/qga/qapi-schema.json
+++ b/qga/qapi-schema.json
@@ -1321,7 +1321,8 @@
 # Since: 5.2
 ##
 { 'command': 'guest-ssh-add-authorized-keys',
-  'data': { 'username': 'str', 'keys': ['str'] } }
+  'data': { 'username': 'str', 'keys': ['str'] },
+  'if': 'defined(CONFIG_POSIX)' }
 
 ##
 # @guest-ssh-remove-authorized-keys:
@@ -1338,4 +1339,5 @@
 # Since: 5.2
 ##
 { 'command': 'guest-ssh-remove-authorized-keys',
-  'data': { 'username': 'str', 'keys': ['str'] } }
+  'data': { 'username': 'str', 'keys': ['str'] },
+  'if': 'defined(CONFIG_POSIX)' }
-- 
2.28.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]