Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Jonathan Cameron <jic23 <at> cam.ac.uk>
Subject: [RFC PATCH 0/3] Introduce kstrtobool function
Newsgroups: gmane.linux.kernel
Date: Wednesday 23rd March 2011 13:39:11 UTC (over 5 years ago)
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
 
CD: 2ms