Change 'ephemeral' to 'isephemeral' and 'private' to 'isprivate' since
both are bools.
Signed-off-by: John Ferlan
---
src/conf/secret_conf.c| 26 +-
src/conf/secret_conf.h| 4 ++--
src/secret/secret_driver.c| 10 +-
src/storage/storage_backend.c | 4 ++--
4 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/src/conf/secret_conf.c b/src/conf/secret_conf.c
index 4d0cb9c..6d4de7c 100644
--- a/src/conf/secret_conf.c
+++ b/src/conf/secret_conf.c
@@ -403,7 +403,7 @@ virSecretObjListAddLocked(virSecretObjListPtr secrets,
goto cleanup;
}
-if (secret->def->private && !def->private) {
+if (secret->def->isprivate && !def->isprivate) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("cannot change private flag on existing secret"));
goto cleanup;
@@ -553,17 +553,17 @@ virSecretObjMatchFlags(virSecretObjPtr secret,
/* filter by whether it's ephemeral */
if (MATCH(VIR_CONNECT_LIST_SECRETS_FILTERS_EPHEMERAL) &&
!((MATCH(VIR_CONNECT_LIST_SECRETS_EPHEMERAL) &&
- secret->def->ephemeral) ||
+ secret->def->isephemeral) ||
(MATCH(VIR_CONNECT_LIST_SECRETS_NO_EPHEMERAL) &&
- !secret->def->ephemeral)))
+ !secret->def->isephemeral)))
return false;
/* filter by whether it's private */
if (MATCH(VIR_CONNECT_LIST_SECRETS_FILTERS_PRIVATE) &&
!((MATCH(VIR_CONNECT_LIST_SECRETS_PRIVATE) &&
- secret->def->private) ||
+ secret->def->isprivate) ||
(MATCH(VIR_CONNECT_LIST_SECRETS_NO_PRIVATE) &&
- !secret->def->private)))
+ !secret->def->isprivate)))
return false;
return true;
@@ -699,7 +699,7 @@ virSecretObjDeleteConfig(virSecretObjPtr secret)
/* When the XML is missing, we'll still allow the attempt to
* delete the secret data. Without a configFile, the secret
won't be loaded again, so we have succeeded already. */
-if (!secret->def->ephemeral &&
+if (!secret->def->isephemeral &&
unlink(secret->configFile) < 0 && errno != ENOENT)
return -1;
@@ -838,7 +838,7 @@ virSecretObjSetValue(virSecretObjPtr secret,
secret->value = new_value;
secret->value_size = value_size;
-if (!secret->def->ephemeral && virSecretObjSaveData(secret) < 0)
+if (!secret->def->isephemeral && virSecretObjSaveData(secret) < 0)
goto error;
/* Saved successfully - drop old value */
@@ -995,9 +995,9 @@ secretXMLParseNode(xmlDocPtr xml, xmlNodePtr root)
prop = virXPathString("string(./@ephemeral)", ctxt);
if (prop != NULL) {
if (STREQ(prop, "yes")) {
-def->ephemeral = true;
+def->isephemeral = true;
} else if (STREQ(prop, "no")) {
-def->ephemeral = false;
+def->isephemeral = false;
} else {
virReportError(VIR_ERR_XML_ERROR, "%s",
_("invalid value of 'ephemeral'"));
@@ -1009,9 +1009,9 @@ secretXMLParseNode(xmlDocPtr xml, xmlNodePtr root)
prop = virXPathString("string(./@private)", ctxt);
if (prop != NULL) {
if (STREQ(prop, "yes")) {
-def->private = true;
+def->isprivate = true;
} else if (STREQ(prop, "no")) {
-def->private = false;
+def->isprivate = false;
} else {
virReportError(VIR_ERR_XML_ERROR, "%s",
_("invalid value of 'private'"));
@@ -1137,8 +1137,8 @@ virSecretDefFormat(const virSecretDef *def)
char uuidstr[VIR_UUID_STRING_BUFLEN];
virBufferAsprintf(&buf, "\n",
- def->ephemeral ? "yes" : "no",
- def->private ? "yes" : "no");
+ def->isephemeral ? "yes" : "no",
+ def->isprivate ? "yes" : "no");
uuid = def->uuid;
virUUIDFormat(uuid, uuidstr);
diff --git a/src/conf/secret_conf.h b/src/conf/secret_conf.h
index be3bff9..a64a4d9 100644
--- a/src/conf/secret_conf.h
+++ b/src/conf/secret_conf.h
@@ -32,8 +32,8 @@ VIR_ENUM_DECL(virSecretUsage)
typedef struct _virSecretDef virSecretDef;
typedef virSecretDef *virSecretDefPtr;
struct _virSecretDef {
-bool ephemeral;
-bool private;
+bool isephemeral;
+bool isprivate;
unsigned char uuid[VIR_UUID_BUFLEN];
char *description; /* May be NULL */
int usage_type;
diff --git a/src/secret/secret_driver.c b/src/secret/secret_driver.c
index ab58115..cdf8d80 100644
--- a/src/secret/secret_driver.c
+++ b/src/secret/secret_driver.c
@@ -230,23 +230,23 @@ secretDefineXML(virConnectPtr conn,
driver->configDir, &backup)))
goto cleanup;
-if (!new_attrs->ephemeral) {
+if (!new_attrs->isephemeral) {
if (secretEnsureDirectory() < 0)
goto cleanup;
-if (backup && backup-