util: 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:
Jonathon Jongsma 2019-06-18 11:12:47 -05:00 committed by Ján Tomko
parent 54416b6a59
commit 0b8b8da7d9
3 changed files with 24 additions and 33 deletions

View File

@ -18,16 +18,15 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBVIRT_VIRSTORAGEENCRYPTION_H #pragma once
# define LIBVIRT_VIRSTORAGEENCRYPTION_H
# include "internal.h" #include "internal.h"
# include "virbuffer.h" #include "virbuffer.h"
# include "virsecret.h" #include "virsecret.h"
# include "virutil.h" #include "virutil.h"
# include "virenum.h" #include "virenum.h"
# include <libxml/tree.h> #include <libxml/tree.h>
typedef enum { typedef enum {
VIR_STORAGE_ENCRYPTION_SECRET_TYPE_PASSPHRASE = 0, VIR_STORAGE_ENCRYPTION_SECRET_TYPE_PASSPHRASE = 0,
@ -93,5 +92,3 @@ enum {
}; };
int virStorageGenerateQcowPassphrase(unsigned char *dest); int virStorageGenerateQcowPassphrase(unsigned char *dest);
#endif /* LIBVIRT_VIRSTORAGEENCRYPTION_H */

View File

@ -19,19 +19,18 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBVIRT_VIRSTORAGEFILE_H #pragma once
# define LIBVIRT_VIRSTORAGEFILE_H
# include <sys/stat.h> #include <sys/stat.h>
# include "virbitmap.h" #include "virbitmap.h"
# include "virobject.h" #include "virobject.h"
# include "virseclabel.h" #include "virseclabel.h"
# include "virstorageencryption.h" #include "virstorageencryption.h"
# include "virutil.h" #include "virutil.h"
# include "virsecret.h" #include "virsecret.h"
# include "virautoclean.h" #include "virautoclean.h"
# include "virenum.h" #include "virenum.h"
/* Minimum header size required to probe all known formats with /* Minimum header size required to probe all known formats with
* virStorageFileProbeFormat, or obtain metadata from a known format. * virStorageFileProbeFormat, or obtain metadata from a known format.
@ -39,7 +38,7 @@
* 32769). Some formats can be probed with fewer bytes. Although * 32769). Some formats can be probed with fewer bytes. Although
* some formats theoretically permit metadata that can rely on offsets * some formats theoretically permit metadata that can rely on offsets
* beyond this size, in practice that doesn't matter. */ * beyond this size, in practice that doesn't matter. */
# define VIR_STORAGE_MAX_HEADER 0x8200 #define VIR_STORAGE_MAX_HEADER 0x8200
/* Types of disk backends (host resource). Comparable to the public /* Types of disk backends (host resource). Comparable to the public
@ -341,9 +340,9 @@ struct _virStorageSource {
}; };
# ifndef DEV_BSIZE #ifndef DEV_BSIZE
# define DEV_BSIZE 512 # define DEV_BSIZE 512
# endif #endif
int virStorageFileProbeFormat(const char *path, uid_t uid, gid_t gid); int virStorageFileProbeFormat(const char *path, uid_t uid, gid_t gid);
@ -548,5 +547,3 @@ void virStorageFileReportBrokenChain(int errcode,
virStorageSourcePtr parent); virStorageSourcePtr parent);
VIR_DEFINE_AUTOPTR_FUNC(virStorageAuthDef, virStorageAuthDefFree); VIR_DEFINE_AUTOPTR_FUNC(virStorageAuthDef, virStorageAuthDefFree);
#endif /* LIBVIRT_VIRSTORAGEFILE_H */

View File

@ -18,12 +18,11 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBVIRT_VIRSTORAGEFILEBACKEND_H #pragma once
# define LIBVIRT_VIRSTORAGEFILEBACKEND_H
# include <sys/stat.h> #include <sys/stat.h>
# include "virstoragefile.h" #include "virstoragefile.h"
/* ------- virStorageFile backends ------------ */ /* ------- virStorageFile backends ------------ */
typedef struct _virStorageFileBackend virStorageFileBackend; typedef struct _virStorageFileBackend virStorageFileBackend;
@ -99,5 +98,3 @@ struct _virStorageFileBackend {
}; };
int virStorageFileBackendRegister(virStorageFileBackendPtr backend); int virStorageFileBackendRegister(virStorageFileBackendPtr backend);
#endif /* LIBVIRT_VIRSTORAGEFILEBACKEND_H */