table of contents
other versions
KSTRTOBOOL(9) | Basic C Library Functions | KSTRTOBOOL(9) |
NAME¶
kstrtobool - convert common user inputs into boolean values
SYNOPSIS¶
int kstrtobool(const char * s, bool * res);
ARGUMENTS¶
const char * s
input string
bool * res
result
DESCRIPTION¶
This routine returns 0 iff the first character is one of 'Yy1Nn0', or [oO][NnFf] for “on” and “off”. Otherwise it will return -EINVAL. Value pointed to by res is updated upon finding a match.
COPYRIGHT¶
July 2017 | Kernel Hackers Manual 4.11 |