mirror of https://gitee.com/openkylin/libvirt.git
src/storage: 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
55474a8ce7
commit
9dd2915056
|
@ -16,14 +16,13 @@
|
|||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_STORAGE_BACKEND_H
|
||||
# define LIBVIRT_STORAGE_BACKEND_H
|
||||
#pragma once
|
||||
|
||||
# include <sys/stat.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
# include "internal.h"
|
||||
# include "virstorageobj.h"
|
||||
# include "storage_driver.h"
|
||||
#include "internal.h"
|
||||
#include "virstorageobj.h"
|
||||
#include "storage_driver.h"
|
||||
|
||||
typedef char * (*virStorageBackendFindPoolSources)(const char *srcSpec,
|
||||
unsigned int flags);
|
||||
|
@ -128,5 +127,3 @@ int virStorageBackendRegister(virStorageBackendPtr backend);
|
|||
|
||||
virCapsPtr
|
||||
virStorageBackendGetCapabilities(void);
|
||||
|
||||
#endif /* LIBVIRT_STORAGE_BACKEND_H */
|
||||
|
|
|
@ -19,9 +19,6 @@
|
|||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_STORAGE_BACKEND_DISK_H
|
||||
# define LIBVIRT_STORAGE_BACKEND_DISK_H
|
||||
#pragma once
|
||||
|
||||
int virStorageBackendDiskRegister(void);
|
||||
|
||||
#endif /* LIBVIRT_STORAGE_BACKEND_DISK_H */
|
||||
|
|
|
@ -19,9 +19,6 @@
|
|||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_STORAGE_BACKEND_FS_H
|
||||
# define LIBVIRT_STORAGE_BACKEND_FS_H
|
||||
#pragma once
|
||||
|
||||
int virStorageBackendFsRegister(void);
|
||||
|
||||
#endif /* LIBVIRT_STORAGE_BACKEND_FS_H */
|
||||
|
|
|
@ -19,9 +19,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_STORAGE_BACKEND_GLUSTER_H
|
||||
# define LIBVIRT_STORAGE_BACKEND_GLUSTER_H
|
||||
#pragma once
|
||||
|
||||
int virStorageBackendGlusterRegister(void);
|
||||
|
||||
#endif /* LIBVIRT_STORAGE_BACKEND_GLUSTER_H */
|
||||
|
|
|
@ -19,9 +19,6 @@
|
|||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_STORAGE_BACKEND_ISCSI_H
|
||||
# define LIBVIRT_STORAGE_BACKEND_ISCSI_H
|
||||
#pragma once
|
||||
|
||||
int virStorageBackendISCSIRegister(void);
|
||||
|
||||
#endif /* LIBVIRT_STORAGE_BACKEND_ISCSI_H */
|
||||
|
|
|
@ -14,9 +14,6 @@
|
|||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_STORAGE_BACKEND_ISCSI_DIRECT_H
|
||||
# define LIBVIRT_STORAGE_BACKEND_ISCSI_DIRECT_H
|
||||
#pragma once
|
||||
|
||||
int virStorageBackendISCSIDirectRegister(void);
|
||||
|
||||
#endif /* LIBVIRT_STORAGE_BACKEND_ISCSI_DIRECT_H */
|
||||
|
|
|
@ -19,9 +19,6 @@
|
|||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_STORAGE_BACKEND_LOGICAL_H
|
||||
# define LIBVIRT_STORAGE_BACKEND_LOGICAL_H
|
||||
#pragma once
|
||||
|
||||
int virStorageBackendLogicalRegister(void);
|
||||
|
||||
#endif /* LIBVIRT_STORAGE_BACKEND_LOGICAL_H */
|
||||
|
|
|
@ -19,9 +19,6 @@
|
|||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_STORAGE_BACKEND_MPATH_H
|
||||
# define LIBVIRT_STORAGE_BACKEND_MPATH_H
|
||||
#pragma once
|
||||
|
||||
int virStorageBackendMpathRegister(void);
|
||||
|
||||
#endif /* LIBVIRT_STORAGE_BACKEND_MPATH_H */
|
||||
|
|
|
@ -18,9 +18,6 @@
|
|||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_STORAGE_BACKEND_RBD_H
|
||||
# define LIBVIRT_STORAGE_BACKEND_RBD_H
|
||||
#pragma once
|
||||
|
||||
int virStorageBackendRBDRegister(void);
|
||||
|
||||
#endif /* LIBVIRT_STORAGE_BACKEND_RBD_H */
|
||||
|
|
|
@ -19,9 +19,6 @@
|
|||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_STORAGE_BACKEND_SCSI_H
|
||||
# define LIBVIRT_STORAGE_BACKEND_SCSI_H
|
||||
#pragma once
|
||||
|
||||
int virStorageBackendSCSIRegister(void);
|
||||
|
||||
#endif /* LIBVIRT_STORAGE_BACKEND_SCSI_H */
|
||||
|
|
|
@ -20,9 +20,6 @@
|
|||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_STORAGE_BACKEND_SHEEPDOG_H
|
||||
# define LIBVIRT_STORAGE_BACKEND_SHEEPDOG_H
|
||||
#pragma once
|
||||
|
||||
int virStorageBackendSheepdogRegister(void);
|
||||
|
||||
#endif /* LIBVIRT_STORAGE_BACKEND_SHEEPDOG_H */
|
||||
|
|
|
@ -20,14 +20,11 @@
|
|||
# error "storage_backend_sheepdog_priv.h may only be included by storage_backend_sheepdog.c or test suites"
|
||||
#endif /* LIBVIRT_STORAGE_BACKEND_SHEEPDOG_PRIV_H_ALLOW */
|
||||
|
||||
#ifndef LIBVIRT_STORAGE_BACKEND_SHEEPDOG_PRIV_H
|
||||
# define LIBVIRT_STORAGE_BACKEND_SHEEPDOG_PRIV_H
|
||||
#pragma once
|
||||
|
||||
# include "conf/storage_conf.h"
|
||||
#include "conf/storage_conf.h"
|
||||
|
||||
int virStorageBackendSheepdogParseNodeInfo(virStoragePoolDefPtr pool,
|
||||
char *output);
|
||||
int virStorageBackendSheepdogParseVdiList(virStorageVolDefPtr vol,
|
||||
char *output);
|
||||
|
||||
#endif /* LIBVIRT_STORAGE_BACKEND_SHEEPDOG_PRIV_H */
|
||||
|
|
|
@ -18,9 +18,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_STORAGE_BACKEND_VSTORAGE_H
|
||||
# define LIBVIRT_STORAGE_BACKEND_VSTORAGE_H
|
||||
#pragma once
|
||||
|
||||
int virStorageBackendVstorageRegister(void);
|
||||
|
||||
#endif /* LIBVIRT_STORAGE_BACKEND_VSTORAGE_H */
|
||||
|
|
|
@ -19,9 +19,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_STORAGE_BACKEND_ZFS_H
|
||||
# define LIBVIRT_STORAGE_BACKEND_ZFS_H
|
||||
#pragma once
|
||||
|
||||
int virStorageBackendZFSRegister(void);
|
||||
|
||||
#endif /* LIBVIRT_STORAGE_BACKEND_ZFS_H */
|
||||
|
|
|
@ -19,13 +19,12 @@
|
|||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_STORAGE_DRIVER_H
|
||||
# define LIBVIRT_STORAGE_DRIVER_H
|
||||
#pragma once
|
||||
|
||||
# include <sys/stat.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
# include "domain_conf.h"
|
||||
# include "virstorageobj.h"
|
||||
#include "domain_conf.h"
|
||||
#include "virstorageobj.h"
|
||||
|
||||
virStoragePoolObjPtr virStoragePoolObjFindPoolByUUID(const unsigned char *uuid)
|
||||
ATTRIBUTE_NONNULL(1);
|
||||
|
@ -41,5 +40,3 @@ char *virStoragePoolObjBuildTempFilePath(virStoragePoolObjPtr obj,
|
|||
|
||||
int storageRegister(void);
|
||||
int storageRegisterAll(void);
|
||||
|
||||
#endif /* LIBVIRT_STORAGE_DRIVER_H */
|
||||
|
|
|
@ -18,9 +18,6 @@
|
|||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_STORAGE_FILE_FS_H
|
||||
# define LIBVIRT_STORAGE_FILE_FS_H
|
||||
#pragma once
|
||||
|
||||
int virStorageFileFsRegister(void);
|
||||
|
||||
#endif /* LIBVIRT_STORAGE_FILE_FS_H */
|
||||
|
|
|
@ -19,9 +19,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_STORAGE_FILE_GLUSTER_H
|
||||
# define LIBVIRT_STORAGE_FILE_GLUSTER_H
|
||||
#pragma once
|
||||
|
||||
int virStorageFileGlusterRegister(void);
|
||||
|
||||
#endif /* LIBVIRT_STORAGE_FILE_GLUSTER_H */
|
||||
|
|
|
@ -16,15 +16,14 @@
|
|||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_STORAGE_UTIL_H
|
||||
# define LIBVIRT_STORAGE_UTIL_H
|
||||
#pragma once
|
||||
|
||||
# include <sys/stat.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
# include "internal.h"
|
||||
# include "vircommand.h"
|
||||
# include "storage_driver.h"
|
||||
# include "storage_backend.h"
|
||||
#include "internal.h"
|
||||
#include "vircommand.h"
|
||||
#include "storage_driver.h"
|
||||
#include "storage_backend.h"
|
||||
|
||||
/* Storage Pool Namespace options to share w/ storage_backend_fs.c and
|
||||
* the virStorageBackendFileSystemMountCmd method */
|
||||
|
@ -138,21 +137,21 @@ enum {
|
|||
VIR_STORAGE_VOL_READ_NOERROR = 1 << 0, /* ignore *read errors */
|
||||
};
|
||||
|
||||
# define VIR_STORAGE_VOL_OPEN_DEFAULT (VIR_STORAGE_VOL_OPEN_REG |\
|
||||
VIR_STORAGE_VOL_OPEN_BLOCK)
|
||||
#define VIR_STORAGE_VOL_OPEN_DEFAULT (VIR_STORAGE_VOL_OPEN_REG |\
|
||||
VIR_STORAGE_VOL_OPEN_BLOCK)
|
||||
|
||||
# define VIR_STORAGE_VOL_FS_OPEN_FLAGS (VIR_STORAGE_VOL_OPEN_DEFAULT | \
|
||||
VIR_STORAGE_VOL_OPEN_DIR)
|
||||
# define VIR_STORAGE_VOL_FS_PROBE_FLAGS (VIR_STORAGE_VOL_FS_OPEN_FLAGS | \
|
||||
VIR_STORAGE_VOL_OPEN_NOERROR)
|
||||
#define VIR_STORAGE_VOL_FS_OPEN_FLAGS (VIR_STORAGE_VOL_OPEN_DEFAULT | \
|
||||
VIR_STORAGE_VOL_OPEN_DIR)
|
||||
#define VIR_STORAGE_VOL_FS_PROBE_FLAGS (VIR_STORAGE_VOL_FS_OPEN_FLAGS | \
|
||||
VIR_STORAGE_VOL_OPEN_NOERROR)
|
||||
|
||||
int virStorageBackendVolOpen(const char *path, struct stat *sb,
|
||||
unsigned int flags)
|
||||
ATTRIBUTE_RETURN_CHECK
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
||||
|
||||
# define VIR_STORAGE_DEFAULT_POOL_PERM_MODE 0711
|
||||
# define VIR_STORAGE_DEFAULT_VOL_PERM_MODE 0600
|
||||
#define VIR_STORAGE_DEFAULT_POOL_PERM_MODE 0711
|
||||
#define VIR_STORAGE_DEFAULT_VOL_PERM_MODE 0600
|
||||
|
||||
int virStorageBackendUpdateVolInfo(virStorageVolDefPtr vol,
|
||||
bool withBlockVolFormat,
|
||||
|
@ -203,5 +202,3 @@ virCommandPtr
|
|||
virStorageBackendLogicalChangeCmd(const char *cmdstr,
|
||||
virStoragePoolDefPtr def,
|
||||
bool on);
|
||||
|
||||
#endif /* LIBVIRT_STORAGE_UTIL_H */
|
||||
|
|
Loading…
Reference in New Issue