[PATCH 0/3 V3] Introduce strtobool (previously usr_strtobool).

From: Jonathan Cameron
Date: Tue Apr 19 2011 - 07:42:36 EST


Hi All,

Third pass at introducing a new function to unify code that
is attempting to get a Boolean value from user input strings.

Rusty made the point that the usr_ in V2 implied user pointers, which
these aren't. Hence the usr_ prefix has been dropped. The naming
is still distinct enough from kstrtox to avoid any implication that
this function has the same tight parameter passing that those
functions have.

Use cases are the two converted here and numerous Boolean attributes in
sysfs. It is for the sysfs use cases that I'm interested, but Greg KH
pointed out a good start would be to unify these two, so that is
what we have here.

Jonathan Cameron (3):
Add a strtobool function matching semantics of existing in kernel
equivalents
debugfs: move to new strtobool
params.c: Use new strtobool function to process boolean inputs

fs/debugfs/file.c | 17 ++++-------------
include/linux/string.h | 1 +
kernel/params.c | 14 ++++----------
lib/string.c | 29 +++++++++++++++++++++++++++++
4 files changed, 38 insertions(+), 23 deletions(-)

--
1.7.3.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/