diff mbox series

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

Message ID 20201020081257.2054548-5-marcandre.lureau@redhat.com
State New
Headers show
Series qemu-ga: add ssh-{get,add,remove}-authorized-keys | expand

Commit Message

Marc-André Lureau Oct. 20, 2020, 8:12 a.m. UTC
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 mbox series

Patch

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)' }