From 4e081c5cc71365378afca5271f7b461516725a77 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Wed, 11 Jan 2023 17:08:32 -0800 Subject: 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. --- src/modules/rtv/rtv.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/modules') 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)) -- cgit v1.2.3