diff options
Diffstat (limited to 'src/settings/plugins/ifcfg-rh/shvar.c')
| -rw-r--r-- | src/settings/plugins/ifcfg-rh/shvar.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/settings/plugins/ifcfg-rh/shvar.c b/src/settings/plugins/ifcfg-rh/shvar.c index 283aa826..5fd7755f 100644 --- a/src/settings/plugins/ifcfg-rh/shvar.c +++ b/src/settings/plugins/ifcfg-rh/shvar.c @@ -299,8 +299,8 @@ svGetValueFull (shvarFile *s, const char *key, gboolean verbatim) return value; } -/* return TRUE if <key> resolves to any truth value (e.g. "yes", "y", "true") - * return FALSE if <key> resolves to any non-truth value (e.g. "no", "n", "false") +/* return TRUE if <key> resolves to any truth value (e.g. "yes", "true", "y", "t", "1") + * return FALSE if <key> resolves to any non-truth value (e.g. "no", "false", "n", "f", "0") * return <default> otherwise */ gint @@ -316,12 +316,14 @@ svTrueValue (shvarFile *s, const char *key, gint def) if ( !g_ascii_strcasecmp ("yes", tmp) || !g_ascii_strcasecmp ("true", tmp) || !g_ascii_strcasecmp ("t", tmp) - || !g_ascii_strcasecmp ("y", tmp)) + || !g_ascii_strcasecmp ("y", tmp) + || !g_ascii_strcasecmp ("1", tmp)) returnValue = TRUE; else if ( !g_ascii_strcasecmp ("no", tmp) || !g_ascii_strcasecmp ("false", tmp) || !g_ascii_strcasecmp ("f", tmp) - || !g_ascii_strcasecmp ("n", tmp)) + || !g_ascii_strcasecmp ("n", tmp) + || !g_ascii_strcasecmp ("0", tmp)) returnValue = FALSE; g_free (tmp); |