---
name: "kstrtobool"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/kstrtobool"
---

# kstrtobool(9)

convert common user inputs into boolean values

## NAME

kstrtobool - convert common user inputs into boolean values

## SYNOPSIS

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

## ARGUMENTS

*s*

input string

*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
