1KSTRTOBOOL(9)              Basic C Library Functions             KSTRTOBOOL(9)
2
3
4

NAME

6       kstrtobool - convert common user inputs into boolean values
7

SYNOPSIS

9       int kstrtobool(const char * s, bool * res);
10

ARGUMENTS

12       s
13           input string
14
15       res
16           result
17

DESCRIPTION

19       This routine returns 0 iff the first character is one of 'Yy1Nn0', or
20       [oO][NnFf] for “on” and “off”. Otherwise it will return -EINVAL. Value
21       pointed to by res is updated upon finding a match.
22
24Kernel Hackers Manual 3.10         June 2019                     KSTRTOBOOL(9)
Impressum