mirror of
https://cagebreak.project-repo.co/cagebreak.git
synced 2026-08-23 05:54:19 +02:00
Add functionality for turning outputs off
This commit is contained in:
parent
d68c97cdc0
commit
c3e8ffe22f
3 changed files with 18 additions and 2 deletions
7
parse.c
7
parse.c
|
|
@ -545,6 +545,10 @@ parse_output_config_keyword(char *key_str, enum output_status *status) {
|
|||
*status = OUTPUT_ENABLE;
|
||||
} else if(strcmp(key_str, "disable") == 0) {
|
||||
*status = OUTPUT_DISABLE;
|
||||
} else if(strcmp(key_str, "off") == 0) {
|
||||
*status = OUTPUT_OFF;
|
||||
} else if(strcmp(key_str, "on") == 0) {
|
||||
*status = OUTPUT_ENABLE;
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
|
|
@ -579,7 +583,8 @@ parse_output_config(char **saveptr, char **errstr) {
|
|||
name);
|
||||
goto error;
|
||||
}
|
||||
if(cfg->status == OUTPUT_ENABLE || cfg->status == OUTPUT_DISABLE) {
|
||||
if(cfg->status == OUTPUT_ENABLE || cfg->status == OUTPUT_DISABLE ||
|
||||
cfg->status == OUTPUT_OFF) {
|
||||
cfg->output_name = strdup(name);
|
||||
return cfg;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue