mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
ctdb-common: Allow boolean configuration values to have yes/no values
This make the new configuration style more consistent with the old one. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13589 Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
parent
a9758f413d
commit
21de59ab7f
@ -122,12 +122,12 @@ static int string_to_integer(const char *str, int *int_val)
|
||||
|
||||
static int string_to_boolean(const char *str, bool *bool_val)
|
||||
{
|
||||
if (strcasecmp(str, "true") == 0) {
|
||||
if (strcasecmp(str, "true") == 0 || strcasecmp(str, "yes") == 0) {
|
||||
*bool_val = true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (strcasecmp(str, "false") == 0) {
|
||||
if (strcasecmp(str, "false") == 0 || strcasecmp(str, "no") == 0) {
|
||||
*bool_val = false;
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user