diff options
author | Eric Engestrom <[email protected]> | 2019-06-21 11:35:08 +0100 |
---|---|---|
committer | Eric Engestrom <[email protected]> | 2019-06-24 12:49:13 +0000 |
commit | 2d2e824fae4b78959513a40768bc247accb67175 (patch) | |
tree | e81fb2daec95b92bb46326638974d838659ad568 | |
parent | 0cb9ce12fdcbafa913053849defc561f02aa6d10 (diff) |
util: support "y" and "n" in env_var_as_boolean()
Suggested-by: Chris Wilson <[email protected]>
Signed-off-by: Eric Engestrom <[email protected]>
Reviewed-by: Jordan Justen <[email protected]>
Reviewed-by: Christian Gmeiner <[email protected]>
-rw-r--r-- | src/util/debug.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/util/debug.c b/src/util/debug.c index 09de1a8bbe5..d800481c847 100644 --- a/src/util/debug.c +++ b/src/util/debug.c @@ -81,10 +81,12 @@ env_var_as_boolean(const char *var_name, bool default_value) if (strcmp(str, "1") == 0 || strcasecmp(str, "true") == 0 || + strcasecmp(str, "y") == 0 || strcasecmp(str, "yes") == 0) { return true; } else if (strcmp(str, "0") == 0 || strcasecmp(str, "false") == 0 || + strcasecmp(str, "n") == 0 || strcasecmp(str, "no") == 0) { return false; } else { |