[RFC PATCH 0/3] Introduce kstrtobool function

From: Jonathan Cameron
Date: Wed Mar 23 2011 - 09:38:35 EST


Dear all,

This is an initial stab at a simple utility function intended to pin
down what the kernel considers to be 'true' and 'false'. My original
query was centered around processing of sysfs inputs but as Greg
pointed out there are a couple of other places in kernel where this
functionality would be useful.

Given my main targets are in staging:iio I will provide patches for them
if/when people are happy with what we have here.

I obviously need to add some documentation, but want to get some
quick opinions on whether this is a good idea.

If the concept is fine the obvious questions are:

1) Function naming - this is only tangentially similar to kstrto* so
is that a sensible location
2) Other values people think should be true or false.

Thanks,

Jonathan

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

fs/debugfs/file.c | 19 ++++++-------------
include/linux/kernel.h | 1 +
kernel/params.c | 15 ++++-----------
lib/kstrtox.c | 18 ++++++++++++++++++
4 files changed, 29 insertions(+), 24 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/