src/remote: use #pragma once in headers

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Jonathon Jongsma 2019-06-18 11:12:38 -05:00 committed by Ján Tomko
parent 5dad4b5d93
commit 85dd3d05cc
5 changed files with 40 additions and 56 deletions

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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"