mirror of https://gitee.com/openkylin/libvirt.git
src/lxc: 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:
parent
91d16fdba0
commit
bef4af0ea4
|
@ -19,13 +19,12 @@
|
|||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_LXC_CGROUP_H
|
||||
# define LIBVIRT_LXC_CGROUP_H
|
||||
#pragma once
|
||||
|
||||
# include "vircgroup.h"
|
||||
# include "domain_conf.h"
|
||||
# include "lxc_fuse.h"
|
||||
# include "virusb.h"
|
||||
#include "vircgroup.h"
|
||||
#include "domain_conf.h"
|
||||
#include "lxc_fuse.h"
|
||||
#include "virusb.h"
|
||||
|
||||
virCgroupPtr virLXCCgroupCreate(virDomainDefPtr def,
|
||||
pid_t initpid,
|
||||
|
@ -47,5 +46,3 @@ int
|
|||
virLXCTeardownHostUSBDeviceCgroup(virUSBDevicePtr dev,
|
||||
const char *path,
|
||||
void *opaque);
|
||||
|
||||
#endif /* LIBVIRT_LXC_CGROUP_H */
|
||||
|
|
|
@ -19,29 +19,28 @@
|
|||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_LXC_CONF_H
|
||||
# define LIBVIRT_LXC_CONF_H
|
||||
#pragma once
|
||||
|
||||
# include "internal.h"
|
||||
# include "libvirt_internal.h"
|
||||
# include "domain_conf.h"
|
||||
# include "domain_event.h"
|
||||
# include "capabilities.h"
|
||||
# include "virthread.h"
|
||||
# include "security/security_manager.h"
|
||||
# include "configmake.h"
|
||||
# include "vircgroup.h"
|
||||
# include "virsysinfo.h"
|
||||
# include "virusb.h"
|
||||
# include "virclosecallbacks.h"
|
||||
# include "virhostdev.h"
|
||||
#include "internal.h"
|
||||
#include "libvirt_internal.h"
|
||||
#include "domain_conf.h"
|
||||
#include "domain_event.h"
|
||||
#include "capabilities.h"
|
||||
#include "virthread.h"
|
||||
#include "security/security_manager.h"
|
||||
#include "configmake.h"
|
||||
#include "vircgroup.h"
|
||||
#include "virsysinfo.h"
|
||||
#include "virusb.h"
|
||||
#include "virclosecallbacks.h"
|
||||
#include "virhostdev.h"
|
||||
|
||||
# define LXC_DRIVER_NAME "LXC"
|
||||
#define LXC_DRIVER_NAME "LXC"
|
||||
|
||||
# define LXC_CONFIG_DIR SYSCONFDIR "/libvirt/lxc"
|
||||
# define LXC_STATE_DIR LOCALSTATEDIR "/run/libvirt/lxc"
|
||||
# define LXC_LOG_DIR LOCALSTATEDIR "/log/libvirt/lxc"
|
||||
# define LXC_AUTOSTART_DIR LXC_CONFIG_DIR "/autostart"
|
||||
#define LXC_CONFIG_DIR SYSCONFDIR "/libvirt/lxc"
|
||||
#define LXC_STATE_DIR LOCALSTATEDIR "/run/libvirt/lxc"
|
||||
#define LXC_LOG_DIR LOCALSTATEDIR "/log/libvirt/lxc"
|
||||
#define LXC_AUTOSTART_DIR LXC_CONFIG_DIR "/autostart"
|
||||
|
||||
typedef struct _virLXCDriver virLXCDriver;
|
||||
typedef virLXCDriver *virLXCDriverPtr;
|
||||
|
@ -120,5 +119,3 @@ static inline void lxcDriverUnlock(virLXCDriverPtr driver)
|
|||
{
|
||||
virMutexUnlock(&driver->lock);
|
||||
}
|
||||
|
||||
#endif /* LIBVIRT_LXC_CONF_H */
|
||||
|
|
|
@ -18,29 +18,28 @@
|
|||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_LXC_CONTAINER_H
|
||||
# define LIBVIRT_LXC_CONTAINER_H
|
||||
#pragma once
|
||||
|
||||
# include "lxc_conf.h"
|
||||
# include "lxc_domain.h"
|
||||
# include "security/security_manager.h"
|
||||
#include "lxc_conf.h"
|
||||
#include "lxc_domain.h"
|
||||
#include "security/security_manager.h"
|
||||
|
||||
# define LXC_DEV_MAJ_MEMORY 1
|
||||
# define LXC_DEV_MIN_NULL 3
|
||||
# define LXC_DEV_MIN_ZERO 5
|
||||
# define LXC_DEV_MIN_FULL 7
|
||||
# define LXC_DEV_MIN_RANDOM 8
|
||||
# define LXC_DEV_MIN_URANDOM 9
|
||||
#define LXC_DEV_MAJ_MEMORY 1
|
||||
#define LXC_DEV_MIN_NULL 3
|
||||
#define LXC_DEV_MIN_ZERO 5
|
||||
#define LXC_DEV_MIN_FULL 7
|
||||
#define LXC_DEV_MIN_RANDOM 8
|
||||
#define LXC_DEV_MIN_URANDOM 9
|
||||
|
||||
# define LXC_DEV_MAJ_TTY 5
|
||||
# define LXC_DEV_MIN_TTY 0
|
||||
# define LXC_DEV_MIN_CONSOLE 1
|
||||
# define LXC_DEV_MIN_PTMX 2
|
||||
#define LXC_DEV_MAJ_TTY 5
|
||||
#define LXC_DEV_MIN_TTY 0
|
||||
#define LXC_DEV_MIN_CONSOLE 1
|
||||
#define LXC_DEV_MIN_PTMX 2
|
||||
|
||||
# define LXC_DEV_MAJ_PTY 136
|
||||
#define LXC_DEV_MAJ_PTY 136
|
||||
|
||||
# define LXC_DEV_MAJ_FUSE 10
|
||||
# define LXC_DEV_MIN_FUSE 229
|
||||
#define LXC_DEV_MAJ_FUSE 10
|
||||
#define LXC_DEV_MIN_FUSE 229
|
||||
|
||||
int lxcContainerSendContinue(int control);
|
||||
int lxcContainerWaitForContinue(int control);
|
||||
|
@ -64,5 +63,3 @@ virArch lxcContainerGetAlt32bitArch(virArch arch);
|
|||
int lxcContainerChown(virDomainDefPtr def, const char *path);
|
||||
|
||||
bool lxcIsBasicMountLocation(const char *path);
|
||||
|
||||
#endif /* LIBVIRT_LXC_CONTAINER_H */
|
||||
|
|
|
@ -19,13 +19,12 @@
|
|||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_LXC_DOMAIN_H
|
||||
# define LIBVIRT_LXC_DOMAIN_H
|
||||
#pragma once
|
||||
|
||||
# include "vircgroup.h"
|
||||
# include "lxc_conf.h"
|
||||
# include "lxc_monitor.h"
|
||||
# include "virenum.h"
|
||||
#include "vircgroup.h"
|
||||
#include "lxc_conf.h"
|
||||
#include "lxc_monitor.h"
|
||||
#include "virenum.h"
|
||||
|
||||
|
||||
typedef enum {
|
||||
|
@ -113,5 +112,3 @@ virLXCDomainGetMachineName(virDomainDefPtr def, pid_t pid);
|
|||
int
|
||||
virLXCDomainSetRunlevel(virDomainObjPtr vm,
|
||||
int runlevel);
|
||||
|
||||
#endif /* LIBVIRT_LXC_DOMAIN_H */
|
||||
|
|
|
@ -18,10 +18,7 @@
|
|||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_LXC_DRIVER_H
|
||||
# define LIBVIRT_LXC_DRIVER_H
|
||||
#pragma once
|
||||
|
||||
/* Function declarations */
|
||||
int lxcRegister(void);
|
||||
|
||||
#endif /* LIBVIRT_LXC_DRIVER_H */
|
||||
|
|
|
@ -18,16 +18,15 @@
|
|||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_LXC_FUSE_H
|
||||
# define LIBVIRT_LXC_FUSE_H
|
||||
#pragma once
|
||||
|
||||
# define FUSE_USE_VERSION 26
|
||||
#define FUSE_USE_VERSION 26
|
||||
|
||||
# if WITH_FUSE
|
||||
# include <fuse.h>
|
||||
# endif
|
||||
#if WITH_FUSE
|
||||
# include <fuse.h>
|
||||
#endif
|
||||
|
||||
# include "lxc_conf.h"
|
||||
#include "lxc_conf.h"
|
||||
|
||||
struct virLXCMeminfo {
|
||||
unsigned long long memtotal;
|
||||
|
@ -56,5 +55,3 @@ typedef struct virLXCFuse *virLXCFusePtr;
|
|||
int lxcSetupFuse(virLXCFusePtr *f, virDomainDefPtr def);
|
||||
int lxcStartFuse(virLXCFusePtr f);
|
||||
void lxcFreeFuse(virLXCFusePtr *f);
|
||||
|
||||
#endif /* LIBVIRT_LXC_FUSE_H */
|
||||
|
|
|
@ -19,11 +19,10 @@
|
|||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_LXC_HOSTDEV_H
|
||||
# define LIBVIRT_LXC_HOSTDEV_H
|
||||
#pragma once
|
||||
|
||||
# include "lxc_conf.h"
|
||||
# include "domain_conf.h"
|
||||
#include "lxc_conf.h"
|
||||
#include "domain_conf.h"
|
||||
|
||||
int virLXCUpdateActiveUSBHostdevs(virLXCDriverPtr driver,
|
||||
virDomainDefPtr def);
|
||||
|
@ -37,5 +36,3 @@ int virLXCPrepareHostDevices(virLXCDriverPtr driver,
|
|||
virDomainDefPtr def);
|
||||
void virLXCDomainReAttachHostDevices(virLXCDriverPtr driver,
|
||||
virDomainDefPtr def);
|
||||
|
||||
#endif /* LIBVIRT_LXC_HOSTDEV_H */
|
||||
|
|
|
@ -18,12 +18,11 @@
|
|||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_LXC_MONITOR_H
|
||||
# define LIBVIRT_LXC_MONITOR_H
|
||||
#pragma once
|
||||
|
||||
# include "virobject.h"
|
||||
# include "domain_conf.h"
|
||||
# include "lxc_monitor_protocol.h"
|
||||
#include "virobject.h"
|
||||
#include "domain_conf.h"
|
||||
#include "lxc_monitor_protocol.h"
|
||||
|
||||
typedef struct _virLXCMonitor virLXCMonitor;
|
||||
typedef virLXCMonitor *virLXCMonitorPtr;
|
||||
|
@ -59,5 +58,3 @@ void virLXCMonitorClose(virLXCMonitorPtr mon);
|
|||
|
||||
void virLXCMonitorLock(virLXCMonitorPtr mon);
|
||||
void virLXCMonitorUnlock(virLXCMonitorPtr mon);
|
||||
|
||||
#endif /* LIBVIRT_LXC_MONITOR_H */
|
||||
|
|
|
@ -18,13 +18,12 @@
|
|||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_LXC_NATIVE_H
|
||||
# define LIBVIRT_LXC_NATIVE_H
|
||||
#pragma once
|
||||
|
||||
# include "domain_conf.h"
|
||||
# include "virenum.h"
|
||||
#include "domain_conf.h"
|
||||
#include "virenum.h"
|
||||
|
||||
# define LXC_CONFIG_FORMAT "lxc-tools"
|
||||
#define LXC_CONFIG_FORMAT "lxc-tools"
|
||||
|
||||
typedef enum {
|
||||
VIR_LXC_NETWORK_CONFIG_NAME,
|
||||
|
@ -46,5 +45,3 @@ VIR_ENUM_DECL(virLXCNetworkConfigEntry);
|
|||
virDomainDefPtr lxcParseConfigString(const char *config,
|
||||
virCapsPtr caps,
|
||||
virDomainXMLOptionPtr xmlopt);
|
||||
|
||||
#endif /* LIBVIRT_LXC_NATIVE_H */
|
||||
|
|
|
@ -19,10 +19,9 @@
|
|||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_LXC_PROCESS_H
|
||||
# define LIBVIRT_LXC_PROCESS_H
|
||||
#pragma once
|
||||
|
||||
# include "lxc_conf.h"
|
||||
#include "lxc_conf.h"
|
||||
|
||||
int virLXCProcessStart(virConnectPtr conn,
|
||||
virLXCDriverPtr driver,
|
||||
|
@ -54,5 +53,3 @@ char *virLXCProcessSetupInterfaceTap(virDomainDefPtr vm,
|
|||
char *virLXCProcessSetupInterfaceDirect(virConnectPtr conn,
|
||||
virDomainDefPtr def,
|
||||
virDomainNetDefPtr net);
|
||||
|
||||
#endif /* LIBVIRT_LXC_PROCESS_H */
|
||||
|
|
Loading…
Reference in New Issue