diff options
| author | Federico Angelilli <code@fedang.net> | 2024-09-08 15:45:57 +0200 |
|---|---|---|
| committer | Federico Angelilli <code@fedang.net> | 2024-09-08 15:45:57 +0200 |
| commit | 5e7f66b34826697537bcdcb60c81f56da956a32b (patch) | |
| tree | cea519be41162f4da216f564a665bb755ac6cdc3 /src/blocks/text.c | |
| parent | feae7fb2bed5357a5e685063e3f6ff005bfc0bd5 (diff) | |
Add ram formatting
Diffstat (limited to 'src/blocks/text.c')
| -rw-r--r-- | src/blocks/text.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/blocks/text.c b/src/blocks/text.c index 0e5fc31..f2c1651 100644 --- a/src/blocks/text.c +++ b/src/blocks/text.c @@ -1,5 +1,17 @@ #include "scheme.h" +#include "../any_log.h" + +static bool block_text_validate(block_t *block, const block_scheme_t *scheme) +{ + if (block->text.text == NULL) { + log_error("Block '%s' requires key '%s'", block->label, "text"); + return false; + } + + return true; +} + const block_scheme_t block_text_scheme = { .name = "text", .block = { @@ -7,5 +19,5 @@ const block_scheme_t block_text_scheme = { }, .size = 0, .entries = NULL, - .verify = NULL, + .validate = block_text_validate, }; |
