main: add -b,--backend command line option

This option allows the user to explicitly select the backend to
use. The default is still to auto-detect.
This commit is contained in:
Daniel Eklöf 2019-05-11 10:53:09 +02:00
parent 473802cab8
commit 5eef162d39
4 changed files with 33 additions and 12 deletions

View file

@ -169,14 +169,14 @@ conf_to_particle(const struct yml_node *node, struct conf_inherit inherited)
}
struct bar *
conf_to_bar(const struct yml_node *bar)
conf_to_bar(const struct yml_node *bar, enum bar_backend backend)
{
if (!conf_verify_bar(bar))
return NULL;
struct bar_config conf = {0};
conf.backend = BAR_BACKEND_AUTO;
struct bar_config conf = {
.backend = backend,
};
/*
* Required attributes