diff options
Diffstat (limited to 'src/block.c')
| -rw-r--r-- | src/block.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/block.c b/src/block.c index 00a0dde..1786502 100644 --- a/src/block.c +++ b/src/block.c @@ -50,11 +50,19 @@ void block_update(block_t *block) } } -config_status_t block_change(block_t *block, const char *key, const char *value) +bool block_change(block_t *block, config_t *config, const char *key, const char *value) { + extern const config_entry_t block_entries[]; + // Ignore notify invocations + config_status_t status = key == NULL + ? CONFIG_UNKNOWN + : config_read_entry(block_entries, block, NULL, "block", block->label, key, value); - return CONFIG_UNKNOWN; + if (status == CONFIG_UNKNOWN && block->scheme->change_fn != NULL) + status = block->scheme->change_fn(block, config, key, value); + + return status == CONFIG_SUCCESS || (!config->action_strict_set && status == CONFIG_UNKNOWN); } void block_free(block_t *block) |
