mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 15:27:47 +00:00
cleanup: Change datatype of secret->ephemeral to boolean
This commit is contained in:
parent
ba474c7844
commit
4258a548d2
@ -161,9 +161,9 @@ secretXMLParseNode(xmlDocPtr xml, xmlNodePtr root)
|
||||
prop = virXPathString("string(./@ephemeral)", ctxt);
|
||||
if (prop != NULL) {
|
||||
if (STREQ(prop, "yes"))
|
||||
def->ephemeral = 1;
|
||||
def->ephemeral = true;
|
||||
else if (STREQ(prop, "no"))
|
||||
def->ephemeral = 0;
|
||||
def->ephemeral = false;
|
||||
else {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("invalid value of 'ephemeral'"));
|
||||
|
@ -31,7 +31,7 @@ VIR_ENUM_DECL(virSecretUsageType)
|
||||
typedef struct _virSecretDef virSecretDef;
|
||||
typedef virSecretDef *virSecretDefPtr;
|
||||
struct _virSecretDef {
|
||||
unsigned ephemeral : 1;
|
||||
bool ephemeral;
|
||||
unsigned private : 1;
|
||||
unsigned char uuid[VIR_UUID_BUFLEN];
|
||||
char *description; /* May be NULL */
|
||||
|
@ -480,7 +480,7 @@ virStorageGenerateQcowEncryption(virConnectPtr conn,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
def->ephemeral = 0;
|
||||
def->ephemeral = false;
|
||||
def->private = 0;
|
||||
if (virStorageGenerateSecretUUID(conn, def->uuid) < 0)
|
||||
goto cleanup;
|
||||
|
Loading…
Reference in New Issue
Block a user