diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2023-01-11 17:08:32 -0800 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2023-01-11 22:31:31 -0800 |
commit | 4e081c5cc71365378afca5271f7b461516725a77 (patch) | |
tree | c347965345e92755364312ebe2637457c79ff224 /src/modules/rtv | |
parent | 0805372ed5460cf4a886e04bf65a5895413463a3 (diff) |
modules/rtv: skip hermetic/experimental modules for "all"
This allows explicit listing of such modules as channels, while
protecting the automagic/defaults scenario.
If there's a future --experimental flag or such added, then the
TIL_MODULE_EXPERIMENTAL check will have to become conditional on
it.
Diffstat (limited to 'src/modules/rtv')
-rw-r--r-- | src/modules/rtv/rtv.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/modules/rtv/rtv.c b/src/modules/rtv/rtv.c index b7f500a..19f823b 100644 --- a/src/modules/rtv/rtv.c +++ b/src/modules/rtv/rtv.c @@ -203,8 +203,13 @@ static int rtv_should_skip_module(const rtv_setup_t *setup, const til_module_t * /* An empty channels list is a special case for representing "all", an * empty channels setting returns -EINVAL during _setup(). */ - if (!setup->channels[0]) + if (!setup->channels[0]) { + /* for "all" skip these, but you can still explicitly name them. */ + if ((module->flags & (TIL_MODULE_HERMETIC | TIL_MODULE_EXPERIMENTAL))) + return 1; + return 0; + } for (char * const *channel = setup->channels; *channel; channel++) { if (!strcasecmp(module->name, *channel)) |