aboutsummaryrefslogtreecommitdiff
path: root/src/config.c
diff options
context:
space:
mode:
authorFederico Angelilli <code@fedang.net>2024-09-08 15:45:57 +0200
committerFederico Angelilli <code@fedang.net>2024-09-08 15:45:57 +0200
commit5e7f66b34826697537bcdcb60c81f56da956a32b (patch)
treecea519be41162f4da216f564a665bb755ac6cdc3 /src/config.c
parentfeae7fb2bed5357a5e685063e3f6ff005bfc0bd5 (diff)
Add ram formatting
Diffstat (limited to 'src/config.c')
-rw-r--r--src/config.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/config.c b/src/config.c
index 38413f4..cde4af1 100644
--- a/src/config.c
+++ b/src/config.c
@@ -205,6 +205,10 @@ static config_status_t config_read_entry(const config_entry_t *entries, void *re
"integer",
"unsigned integer",
"double float",
+ "boolean",
+ "color",
+ "enum",
+ "time",
};
for (int i = 0; entries[i].key != NULL; i++) {
@@ -447,6 +451,13 @@ skip_pair:
free(value);
}
+ if (block != NULL && scheme->validate != NULL) {
+ if (errors != 0)
+ log_trace("Skipped validation for block '%s'", section);
+ else
+ errors += !scheme->validate(block, scheme);
+ }
+
free(section);
n_errors += errors;
} while ((section = any_ini_stream_next_section(&ini)) != NULL);