|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have at least two places which convert a string to a boolean type,
so create a common function for this. strtobool treats
- any positive (nonzero) number as true
- "0" as false
- "true" (case insensitive) as true
- "false" (case insensitive) as false
Every other value results in an error and the input *val is not
modified. The caller is expected to initialize *val with the correct
default before calling strtobool.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|