lkml.org 
[lkml]   [2011]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH 0/3 V3] Introduce strtobool (previously usr_strtobool).
Date
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



\
 
 \ /
  Last update: 2011-04-19 13:45    [W:1.035 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site