Messages in this thread | | | From | Jonathan Cameron <> | Subject | [PATCH 0/3 V3] Introduce strtobool (previously usr_strtobool). | Date | Tue, 19 Apr 2011 12:43:44 +0100 |
| |
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
| |