From ea18f8b2b0337acfa418080d73035fac2185850b Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Wed, 14 May 2014 13:36:56 -0600 Subject: [PATCH] maint: use enum typedef for virstorageencryption.h Continuing the work of consistent enum cleanups; this time in virstorageencryption.h. * src/util/virstorageencryption.h (virStorageEncryptionFormat): Convert to typedef, renaming to avoid collision with function. (virStorageEncryptionSecret, virStorageEncryption): Directly use enums. Signed-off-by: Eric Blake --- src/util/virstorageencryption.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/util/virstorageencryption.h b/src/util/virstorageencryption.h index bf83d341fd..f146249e66 100644 --- a/src/util/virstorageencryption.h +++ b/src/util/virstorageencryption.h @@ -39,23 +39,23 @@ VIR_ENUM_DECL(virStorageEncryptionSecretType) typedef struct _virStorageEncryptionSecret virStorageEncryptionSecret; typedef virStorageEncryptionSecret *virStorageEncryptionSecretPtr; struct _virStorageEncryptionSecret { - int type; /* enum virStorageEncryptionSecretType */ + virStorageEncryptionSecretType type; unsigned char uuid[VIR_UUID_BUFLEN]; }; -enum virStorageEncryptionFormat { +typedef enum { /* "default" is only valid for volume creation */ VIR_STORAGE_ENCRYPTION_FORMAT_DEFAULT = 0, VIR_STORAGE_ENCRYPTION_FORMAT_QCOW, /* Both qcow and qcow2 */ VIR_STORAGE_ENCRYPTION_FORMAT_LAST, -}; +} virStorageEncryptionFormatType; VIR_ENUM_DECL(virStorageEncryptionFormat) typedef struct _virStorageEncryption virStorageEncryption; typedef virStorageEncryption *virStorageEncryptionPtr; struct _virStorageEncryption { - int format; /* enum virStorageEncryptionFormat */ + virStorageEncryptionFormatType format; size_t nsecrets; virStorageEncryptionSecretPtr *secrets; -- GitLab