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