Signed-off-by: Jonathon Jongsma <jjongsma(a)redhat.com>
---
src/remote/remote_daemon.h | 35 +++++++++++++---------------
src/remote/remote_daemon_config.h | 7 ++----
src/remote/remote_daemon_dispatch.h | 11 ++++-----
src/remote/remote_daemon_stream.h | 7 ++----
src/remote/remote_driver.h | 36 +++++++++++++----------------
5 files changed, 40 insertions(+), 56 deletions(-)
diff --git a/src/remote/remote_daemon.h b/src/remote/remote_daemon.h
index 50e912f828..a403d2593a 100644
--- a/src/remote/remote_daemon.h
+++ b/src/remote/remote_daemon.h
@@ -19,22 +19,21 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_REMOTE_DAEMON_H
-# define LIBVIRT_REMOTE_DAEMON_H
+#pragma once
-# define VIR_ENUM_SENTINELS
+#define VIR_ENUM_SENTINELS
-# include <rpc/types.h>
-# include <rpc/xdr.h>
-# include "remote_protocol.h"
-# include "lxc_protocol.h"
-# include "qemu_protocol.h"
-# include "virthread.h"
+#include <rpc/types.h>
+#include <rpc/xdr.h>
+#include "remote_protocol.h"
+#include "lxc_protocol.h"
+#include "qemu_protocol.h"
+#include "virthread.h"
-# if WITH_SASL
-# include "virnetsaslcontext.h"
-# endif
-# include "virnetserverprogram.h"
+#if WITH_SASL
+# include "virnetsaslcontext.h"
+#endif
+#include "virnetserverprogram.h"
typedef struct daemonClientStream daemonClientStream;
typedef daemonClientStream *daemonClientStreamPtr;
@@ -62,9 +61,9 @@ struct daemonClientPrivate {
size_t nsecretEventCallbacks;
bool closeRegistered;
-# if WITH_SASL
+#if WITH_SASL
virNetSASLSessionPtr sasl;
-# endif
+#endif
/* This is only valid if a remote open call has been made on this
* connection, otherwise it will be NULL. Also if remote close is
@@ -82,10 +81,8 @@ struct daemonClientPrivate {
};
-# if WITH_SASL
+#if WITH_SASL
extern virNetSASLContextPtr saslCtxt;
-# endif
+#endif
extern virNetServerProgramPtr remoteProgram;
extern virNetServerProgramPtr qemuProgram;
-
-#endif /* LIBVIRT_REMOTE_DAEMON_H */
diff --git a/src/remote/remote_daemon_config.h b/src/remote/remote_daemon_config.h
index 56d130bdce..533fc7bbd3 100644
--- a/src/remote/remote_daemon_config.h
+++ b/src/remote/remote_daemon_config.h
@@ -19,10 +19,9 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_REMOTE_DAEMON_CONFIG_H
-# define LIBVIRT_REMOTE_DAEMON_CONFIG_H
+#pragma once
-# include "internal.h"
+#include "internal.h"
struct daemonConfig {
char *host_uuid;
@@ -103,5 +102,3 @@ int daemonConfigLoadFile(struct daemonConfig *data,
int daemonConfigLoadData(struct daemonConfig *data,
const char *filename,
const char *filedata);
-
-#endif /* LIBVIRT_REMOTE_DAEMON_CONFIG_H */
diff --git a/src/remote/remote_daemon_dispatch.h b/src/remote/remote_daemon_dispatch.h
index cafe109a21..1f70b9e4e9 100644
--- a/src/remote/remote_daemon_dispatch.h
+++ b/src/remote/remote_daemon_dispatch.h
@@ -18,12 +18,11 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_REMOTE_DAEMON_DISPATCH_H
-# define LIBVIRT_REMOTE_DAEMON_DISPATCH_H
+#pragma once
-# include "remote_protocol.h"
-# include "rpc/virnetserverprogram.h"
-# include "rpc/virnetserverclient.h"
+#include "remote_protocol.h"
+#include "rpc/virnetserverprogram.h"
+#include "rpc/virnetserverclient.h"
extern virNetServerProgramProc remoteProcs[];
@@ -38,5 +37,3 @@ extern size_t qemuNProcs;
void remoteClientFree(void *data);
void *remoteClientNew(virNetServerClientPtr client,
void *opaque);
-
-#endif /* LIBVIRT_REMOTE_DAEMON_DISPATCH_H */
diff --git a/src/remote/remote_daemon_stream.h b/src/remote/remote_daemon_stream.h
index 46e3df5c5e..a9bed10292 100644
--- a/src/remote/remote_daemon_stream.h
+++ b/src/remote/remote_daemon_stream.h
@@ -18,10 +18,9 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_REMOTE_DAEMON_STREAM_H
-# define LIBVIRT_REMOTE_DAEMON_STREAM_H
+#pragma once
-# include "remote_daemon.h"
+#include "remote_daemon.h"
daemonClientStream *
daemonCreateClientStream(virNetServerClientPtr client,
@@ -43,5 +42,3 @@ daemonRemoveClientStream(virNetServerClientPtr client,
void
daemonRemoveAllClientStreams(daemonClientStream *stream);
-
-#endif /* LIBVIRT_REMOTE_DAEMON_STREAM_H */
diff --git a/src/remote/remote_driver.h b/src/remote/remote_driver.h
index 5d6580e855..8c7da6b000 100644
--- a/src/remote/remote_driver.h
+++ b/src/remote/remote_driver.h
@@ -19,31 +19,27 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_REMOTE_DRIVER_H
-# define LIBVIRT_REMOTE_DRIVER_H
+#pragma once
-# include "internal.h"
-# include "configmake.h"
+#include "internal.h"
+#include "configmake.h"
int remoteRegister (void);
unsigned long remoteVersion(void);
-# define LIBVIRTD_LISTEN_ADDR NULL
-# define LIBVIRTD_TLS_PORT "16514"
-# define LIBVIRTD_TCP_PORT "16509"
-# define LIBVIRTD_PRIV_UNIX_SOCKET LOCALSTATEDIR "/run/libvirt/libvirt-sock"
-# define LIBVIRTD_PRIV_UNIX_SOCKET_RO LOCALSTATEDIR
"/run/libvirt/libvirt-sock-ro"
-# define LIBVIRTD_USER_UNIX_SOCKET "libvirt-sock"
-# define LIBVIRTD_CONFIGURATION_FILE SYSCONFDIR "/libvirt/libvirtd.conf"
+#define LIBVIRTD_LISTEN_ADDR NULL
+#define LIBVIRTD_TLS_PORT "16514"
+#define LIBVIRTD_TCP_PORT "16509"
+#define LIBVIRTD_PRIV_UNIX_SOCKET LOCALSTATEDIR "/run/libvirt/libvirt-sock"
+#define LIBVIRTD_PRIV_UNIX_SOCKET_RO LOCALSTATEDIR
"/run/libvirt/libvirt-sock-ro"
+#define LIBVIRTD_USER_UNIX_SOCKET "libvirt-sock"
+#define LIBVIRTD_CONFIGURATION_FILE SYSCONFDIR "/libvirt/libvirtd.conf"
/* Defaults for PKI directory. */
-# define LIBVIRT_PKI_DIR SYSCONFDIR "/pki"
-# define LIBVIRT_CACERT LIBVIRT_PKI_DIR "/CA/cacert.pem"
-# define LIBVIRT_CLIENTKEY LIBVIRT_PKI_DIR "/libvirt/private/clientkey.pem"
-# define LIBVIRT_CLIENTCERT LIBVIRT_PKI_DIR "/libvirt/clientcert.pem"
-# define LIBVIRT_SERVERKEY LIBVIRT_PKI_DIR "/libvirt/private/serverkey.pem"
-# define LIBVIRT_SERVERCERT LIBVIRT_PKI_DIR "/libvirt/servercert.pem"
-
-
-#endif /* LIBVIRT_REMOTE_DRIVER_H */
+#define LIBVIRT_PKI_DIR SYSCONFDIR "/pki"
+#define LIBVIRT_CACERT LIBVIRT_PKI_DIR "/CA/cacert.pem"
+#define LIBVIRT_CLIENTKEY LIBVIRT_PKI_DIR "/libvirt/private/clientkey.pem"
+#define LIBVIRT_CLIENTCERT LIBVIRT_PKI_DIR "/libvirt/clientcert.pem"
+#define LIBVIRT_SERVERKEY LIBVIRT_PKI_DIR "/libvirt/private/serverkey.pem"
+#define LIBVIRT_SERVERCERT LIBVIRT_PKI_DIR "/libvirt/servercert.pem"
--
2.20.1