Print this page
3315 svccfg export -a drops values in PG "general"
Reviewed by: Eric Schrock <eric.schrock@delphix.com>
Reviewed by: Dan McDonald <danmcd@nexenta.com>
@@ -9079,11 +9079,11 @@
err = 1;
if (err) {
xmlFreeNode(n);
- export_pg(pg, eelts, 0);
+ export_pg(pg, eelts, SCE_ALL_VALUES);
return;
}
/* Iterate through the properties & handle each. */
@@ -9114,11 +9114,11 @@
}
xmlFreeNode(m);
}
- export_property(exp_prop, exp_str, &elts, 0);
+ export_property(exp_prop, exp_str, &elts, SCE_ALL_VALUES);
}
if (ret == -1)
scfdie();
(void) xmlAddChild(n, elts.stability);
@@ -9242,11 +9242,11 @@
err = 1;
if (err) {
xmlFreeNode(n);
- export_pg(pg, eelts, 0);
+ export_pg(pg, eelts, SCE_ALL_VALUES);
return;
}
@@ -9419,11 +9419,11 @@
} else if (strcmp(exp_str, SCF_PROPERTY_ENVIRONMENT) == 0) {
if (env != NULL)
continue;
}
- export_property(exp_prop, exp_str, &elts, 0);
+ export_property(exp_prop, exp_str, &elts, SCE_ALL_VALUES);
}
if (ret == -1)
scfdie();
(void) xmlAddChild(n, elts.stability);
@@ -9535,11 +9535,11 @@
}
xmlFreeNode(s);
}
- export_property(exp_prop, exp_str, &elts, 0);
+ export_property(exp_prop, exp_str, &elts, SCE_ALL_VALUES);
}
if (ret == -1)
scfdie();
if (elts.propvals != NULL || elts.properties != NULL)
@@ -9631,11 +9631,11 @@
if (ret == -1)
scfdie();
if (err && env == NULL) {
xmlFreeNode(n);
- export_pg(pg, elts, 0);
+ export_pg(pg, elts, SCE_ALL_VALUES);
return;
}
elts->method_context = n;
}
@@ -9745,11 +9745,11 @@
}
xmlFreeNode(s);
}
- export_property(exp_prop, exp_str, &pgelts, 0);
+ export_property(exp_prop, exp_str, &pgelts, SCE_ALL_VALUES);
}
if (ret == -1)
scfdie();
(void) xmlAddChild(n, pgelts.stability);
@@ -9794,11 +9794,12 @@
scfdie();
if ((ty != SCF_TYPE_ASTRING &&
prop_check_type(exp_prop, SCF_TYPE_FMRI) != 0) ||
prop_get_val(exp_prop, exp_val) != 0) {
- export_property(exp_prop, NULL, &pgelts, 0);
+ export_property(exp_prop, NULL, &pgelts,
+ SCE_ALL_VALUES);
continue;
}
if (scf_property_get_name(exp_prop, exp_str, exp_str_sz) < 0)
scfdie();
@@ -9825,11 +9826,12 @@
warn(gettext("The value of %s is not a valid "
"FMRI.\n"), fmri);
}
- export_property(exp_prop, exp_str, &pgelts, 0);
+ export_property(exp_prop, exp_str, &pgelts,
+ SCE_ALL_VALUES);
continue;
case SCF_ERROR_CONSTRAINT_VIOLATED:
if (g_verbose) {
if (scf_property_to_fmri(exp_prop, fmri,
@@ -9838,11 +9840,12 @@
warn(gettext("The value of %s does not specify "
"a service or an instance.\n"), fmri);
}
- export_property(exp_prop, exp_str, &pgelts, 0);
+ export_property(exp_prop, exp_str, &pgelts,
+ SCE_ALL_VALUES);
continue;
case SCF_ERROR_NOT_FOUND:
if (g_verbose) {
if (scf_property_to_fmri(exp_prop, fmri,
@@ -9851,11 +9854,12 @@
warn(gettext("The entity specified by %s does "
"not exist.\n"), fmri);
}
- export_property(exp_prop, exp_str, &pgelts, 0);
+ export_property(exp_prop, exp_str, &pgelts,
+ SCE_ALL_VALUES);
continue;
default:
#ifndef NDEBUG
(void) fprintf(stderr, "%s:%d: %s() failed with "
@@ -9870,11 +9874,12 @@
scfdie();
warn(gettext("Entity %s is missing dependency property "
"group %s.\n"), fmri, exp_str);
- export_property(exp_prop, NULL, &pgelts, 0);
+ export_property(exp_prop, NULL, &pgelts,
+ SCE_ALL_VALUES);
continue;
}
if (scf_pg_get_type(opg, type, max_scf_pg_type_len + 1) < 0)
scfdie();
@@ -9884,18 +9889,20 @@
scfdie();
warn(gettext("Property group %s is not of "
"expected type %s.\n"), fmri, SCF_GROUP_DEPENDENCY);
- export_property(exp_prop, NULL, &pgelts, 0);
+ export_property(exp_prop, NULL, &pgelts,
+ SCE_ALL_VALUES);
continue;
}
n = export_dependent(opg, exp_str, fmri);
- if (n == NULL)
- export_property(exp_prop, exp_str, &pgelts, 0);
- else {
+ if (n == NULL) {
+ export_property(exp_prop, exp_str, &pgelts,
+ SCE_ALL_VALUES);
+ } else {
if (eelts->dependents == NULL)
eelts->dependents = n;
else
(void) xmlAddSibling(eelts->dependents,
n);
@@ -10015,16 +10022,16 @@
scfdie();
if (strcmp(exp_str, SCF_PG_TM_COMMON_NAME) == 0) {
telts->common_name = export_tm_loctext(pg, "common_name");
if (telts->common_name == NULL)
- export_pg(pg, elts, 0);
+ export_pg(pg, elts, SCE_ALL_VALUES);
return;
} else if (strcmp(exp_str, SCF_PG_TM_DESCRIPTION) == 0) {
telts->description = export_tm_loctext(pg, "description");
if (telts->description == NULL)
- export_pg(pg, elts, 0);
+ export_pg(pg, elts, SCE_ALL_VALUES);
return;
}
if (strncmp(exp_str, SCF_PG_TM_MAN_PREFIX, mansz) == 0) {
child = export_tm_manpage(pg);
@@ -10034,11 +10041,11 @@
if (child != NULL) {
make_node(&telts->documentation, "documentation");
(void) xmlAddChild(telts->documentation, child);
} else {
- export_pg(pg, elts, 0);
+ export_pg(pg, elts, SCE_ALL_VALUES);
}
}
/*
* Process parameter and paramval elements
@@ -10187,11 +10194,11 @@
if (err == 1) {
for (i = 0; i < URI_SCHEME_NUM; ++i)
xmlFree(type[i]);
free(type);
- export_pg(pg, elts, 0);
+ export_pg(pg, elts, SCE_ALL_VALUES);
return;
} else {
for (i = 0; i < URI_SCHEME_NUM; ++i)
if (type[i] != NULL) {
@@ -10263,11 +10270,11 @@
}
xmlFreeNode(rnode);
}
- export_property(exp_prop, exp_str, &pgelts, 0);
+ export_property(exp_prop, exp_str, &pgelts, SCE_ALL_VALUES);
}
if (ret == -1)
scfdie();
if (pgelts.propvals != NULL || pgelts.properties != NULL)