]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
src/storage: use #pragma once in headers
authorJonathon Jongsma <jjongsma@redhat.com>
Tue, 18 Jun 2019 16:12:42 +0000 (11:12 -0500)
committerJán Tomko <jtomko@redhat.com>
Wed, 19 Jun 2019 15:12:31 +0000 (17:12 +0200)
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>
18 files changed:
src/storage/storage_backend.h
src/storage/storage_backend_disk.h
src/storage/storage_backend_fs.h
src/storage/storage_backend_gluster.h
src/storage/storage_backend_iscsi.h
src/storage/storage_backend_iscsi_direct.h
src/storage/storage_backend_logical.h
src/storage/storage_backend_mpath.h
src/storage/storage_backend_rbd.h
src/storage/storage_backend_scsi.h
src/storage/storage_backend_sheepdog.h
src/storage/storage_backend_sheepdog_priv.h
src/storage/storage_backend_vstorage.h
src/storage/storage_backend_zfs.h
src/storage/storage_driver.h
src/storage/storage_file_fs.h
src/storage/storage_file_gluster.h
src/storage/storage_util.h

index c670c66287ac06e151250be65450ee9dee3d7728..86763a9e30d3cbd052e0276486903b10e7e46896 100644 (file)
  * <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 */
index 71c3bcaa2b305f595ebcf5ec2202309a17dedc59..caa6dfba439dd54797814626f67601294278d892 100644 (file)
@@ -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 */
index 638c16a01ec26b2a08fe187ea58e317097dc7163..41cfa1edb0da0c0757e6043b9cdb0a744f78fa34 100644 (file)
@@ -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 */
index 586d6e94dd3d12b7da256c7029f480ae321c2fa1..348f118fb3cf619c4bf64bcbc832a02af814c8a6 100644 (file)
@@ -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 */
index 4b04d1b81d7ca57644e569e8a2ccddc894feecd3..4a5b23864e80f37f449e6c0b82a9ec1ce1d6dd3a 100644 (file)
@@ -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 */
index 07c8acad9d629188077fc58080931a8cc9463021..b9c025aff7423cffb428b4c4ff70d2bb86423140 100644 (file)
@@ -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 */
index 79374c6ca386e1db51a803787fa60b8dd458709b..60c8a44f2354a3548e1532315ed9f8cbbc9d0c69 100644 (file)
@@ -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 */
index 39afa99964a0408392614e23edee0953d831c461..a797db6dcdd14e8b03cd1e010cc5ed534af1fa09 100644 (file)
@@ -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 */
index 1b53d3c65c500d580df85643670c8c0e3a3a13ba..e1cfaa0e95610349ad5020f3a897118637c9a5c8 100644 (file)
@@ -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 */
index 7daa2221db0303561768405b976d7dbd7a15828e..6c05c15ffc83201b62a1b88236b73a8c8370c5de 100644 (file)
@@ -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 */
index e09ad14d1ee5ee7a0eb7efe156f7648854bcfd96..e1fde6373b56d81245addd9b0be94fb3fd3bc54e 100644 (file)
@@ -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 */
index 9f2883593445e6553505f4a0e49c3698035c2ac4..07a35d1d70ae0c4864787158426438f270c93e21 100644 (file)
 # 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 */
index e6f5f821fa2fd981ad7b684fd165abc33eb86223..387867f48ba494afe07ca47a03f0ce417cb491cb 100644 (file)
@@ -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 */
index 98388c5fcae87a6f1a450a450ee3d1e5bc1af71d..28cd68092251db53d7397eb555b5cc31a9b45dfe 100644 (file)
@@ -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 */
index 75632adee59c1448304897fc90b59a07fceea8d6..64b3d8bbf89270515f3abe303b6af1930c590b45 100644 (file)
  * <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 */
index c51c875bc2fd5717c93256796df54319c86c4594..86a625232d0eb375899329da4e64179d1e73e37f 100644 (file)
@@ -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 */
index 3e46cd1c1e3abb019bbe2aefca558ea440b2cf96..1feaf3a8b98aa5e2a9df94aaaf04d5ca67c3a6c3 100644 (file)
@@ -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 */
index 8b44b54a3b0181a5a38b1ab280a816ff5d9bed7c..6df5928d9be5c4f8c9d2790f31dca3e08a5dfc47 100644 (file)
  * <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 */