aboutsummaryrefslogtreecommitdiff
path: root/degesch.c
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2015-07-16 20:40:10 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2015-07-16 20:40:10 +0200
commit1b56b4ee72451a36fefe4fcda35980975166ee94 (patch)
treed2ee06b6c31883bc793104d16d45178fff21d873 /degesch.c
parent6f3b48e4eb7538ba2974730b1c09d752278ec93a (diff)
downloadxK-1b56b4ee72451a36fefe4fcda35980975166ee94.tar.gz
xK-1b56b4ee72451a36fefe4fcda35980975166ee94.tar.xz
xK-1b56b4ee72451a36fefe4fcda35980975166ee94.zip
degesch: skip unrecognized config items in /set
Diffstat (limited to 'degesch.c')
-rw-r--r--degesch.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/degesch.c b/degesch.c
index 5a5110f..8562946 100644
--- a/degesch.c
+++ b/degesch.c
@@ -6399,6 +6399,11 @@ config_dump_item (struct config_item_ *item, struct config_dump_data *data)
return;
}
+ // Currently there's no reason for us to dump unknown items
+ struct config_schema *schema = item->schema;
+ if (!schema)
+ return;
+
struct str line;
str_init (&line);
@@ -6416,7 +6421,6 @@ config_dump_item (struct config_item_ *item, struct config_dump_data *data)
config_item_write (item, false, &value);
// Don't bother writing out null values everywhere
- struct config_schema *schema = item->schema;
bool has_default = schema && schema->default_;
if (item->type != CONFIG_ITEM_NULL || has_default)
{