[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 1/2] Refactor common functions between POSIX and Windows i
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH v4 1/2] Refactor common functions between POSIX and Windows implementation |
Date: |
Wed, 27 Mar 2024 17:59:01 +0100 |
User-agent: |
Mozilla Thunderbird |
On 27/3/24 17:24, aidan_leuck@selinc.com wrote:
From: aidaleuc <aidan_leuck@selinc.com>
Signed-off-by: aidaleuc <aidan_leuck@selinc.com>
---
qga/commands-common-ssh.c | 49 +++++++++++++++++++++++++++++++++++++
qga/commands-common-ssh.h | 12 +++++++++
qga/commands-posix-ssh.c | 51 +++------------------------------------
qga/meson.build | 1 +
4 files changed, 65 insertions(+), 48 deletions(-)
create mode 100644 qga/commands-common-ssh.c
create mode 100644 qga/commands-common-ssh.h
diff --git a/qga/commands-common-ssh.c b/qga/commands-common-ssh.c
new file mode 100644
index 0000000000..5fcf589206
--- /dev/null
+++ b/qga/commands-common-ssh.c
@@ -0,0 +1,49 @@
+/*
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+
+#include "qemu/osdep.h"
+#include "commands-common-ssh.h"
+
[...]
diff --git a/qga/commands-common-ssh.h b/qga/commands-common-ssh.h
new file mode 100644
index 0000000000..04621dfb7b
--- /dev/null
+++ b/qga/commands-common-ssh.h
@@ -0,0 +1,12 @@
+/*
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+
+#include "qapi/error.h"
This header belongs to commands-common-ssh.c.
+#include <qga-qapi-types.h>
"qapi/qapi-builtin-types.h" seems sufficient.
+#include <stdbool.h>
<stdbool.h> is not needed (already included by "qemu/osdep.h"
in source files).
+
+GStrv read_authkeys(const char *path, Error **errp);
+bool check_openssh_pub_keys(strList *keys, size_t *nkeys, Error **errp);
+bool check_openssh_pub_key(const char *key, Error **errp);