Re: [PATCH -mm] Introduce strtol_check_range()

2007-08-04 Thread Alexey Dobriyan
On Fri, Aug 03, 2007 at 02:29:06PM +0530, Satyam Sharma wrote: > On Fri, 3 Aug 2007, Jan Engelhardt wrote: > > > > > On Aug 2 2007 05:16, Satyam Sharma wrote: > > > > > >BSD's strtonum(3) is a detestful, horrible shame. > > > > > >The strtol_check_range() I implemented here does _all_ that

Re: [PATCH -mm] Introduce strtol_check_range()

2007-08-04 Thread Alexey Dobriyan
On Fri, Aug 03, 2007 at 02:29:06PM +0530, Satyam Sharma wrote: On Fri, 3 Aug 2007, Jan Engelhardt wrote: On Aug 2 2007 05:16, Satyam Sharma wrote: BSD's strtonum(3) is a detestful, horrible shame. The strtol_check_range() I implemented here does _all_ that strtonum() does, plus

Re: [PATCH -mm] Introduce strtol_check_range()

2007-08-03 Thread Satyam Sharma
Hi Jan, On Fri, 3 Aug 2007, Jan Engelhardt wrote: > > On Aug 2 2007 05:16, Satyam Sharma wrote: > > > >BSD's strtonum(3) is a detestful, horrible shame. > > > >The strtol_check_range() I implemented here does _all_ that strtonum() > >does, plus is generic w.r.t. base, and minus the tasteless

Re: [PATCH -mm] Introduce strtol_check_range()

2007-08-03 Thread Jan Engelhardt
On Aug 2 2007 05:16, Satyam Sharma wrote: > >BSD's strtonum(3) is a detestful, horrible shame. > >The strtol_check_range() I implemented here does _all_ that strtonum() >does, plus is generic w.r.t. base, and minus the tasteless "errstr" >argument. > >Tell me, how does that "errstr" ever make

Re: [PATCH -mm] Introduce strtol_check_range()

2007-08-03 Thread Jan Engelhardt
On Aug 2 2007 05:16, Satyam Sharma wrote: BSD's strtonum(3) is a detestful, horrible shame. The strtol_check_range() I implemented here does _all_ that strtonum() does, plus is generic w.r.t. base, and minus the tasteless errstr argument. Tell me, how does that errstr ever make sense? We

Re: [PATCH -mm] Introduce strtol_check_range()

2007-08-03 Thread Satyam Sharma
Hi Jan, On Fri, 3 Aug 2007, Jan Engelhardt wrote: On Aug 2 2007 05:16, Satyam Sharma wrote: BSD's strtonum(3) is a detestful, horrible shame. The strtol_check_range() I implemented here does _all_ that strtonum() does, plus is generic w.r.t. base, and minus the tasteless errstr

Re: [PATCH -mm] Introduce strtol_check_range()

2007-08-02 Thread Denis Vlasenko
On 8/2/07, Alexey Dobriyan <[EMAIL PROTECTED]> wrote: > > > Please, copy strtonum() from BSD instead. Nobody needs another > > > home-grown converter. > > > > BSD's strtonum(3) is a detestful, horrible shame. > > > > The strtol_check_range() I implemented here does _all_ that strtonum() > > does,

Re: [PATCH -mm] Introduce strtol_check_range()

2007-08-02 Thread Denis Vlasenko
On 8/2/07, Alexey Dobriyan [EMAIL PROTECTED] wrote: Please, copy strtonum() from BSD instead. Nobody needs another home-grown converter. BSD's strtonum(3) is a detestful, horrible shame. The strtol_check_range() I implemented here does _all_ that strtonum() does, plus is generic

Re: [PATCH -mm] Introduce strtol_check_range()

2007-08-01 Thread Alexey Dobriyan
On Thu, Aug 02, 2007 at 05:16:59AM +0530, Satyam Sharma wrote: > On Wed, 1 Aug 2007, Alexey Dobriyan wrote: > > > On Tue, Jul 31, 2007 at 10:04:10PM +0530, Satyam Sharma wrote: > > > Callers (especially "store" functions for sysfs or configfs attributes) > > > that want to convert an input string

Re: [PATCH -mm] Introduce strtol_check_range()

2007-08-01 Thread Satyam Sharma
On Thu, 2 Aug 2007, Satyam Sharma wrote: > On Wed, 1 Aug 2007, Alexey Dobriyan wrote: > > > On Tue, Jul 31, 2007 at 10:04:10PM +0530, Satyam Sharma wrote: > > > Callers (especially "store" functions for sysfs or configfs attributes) > > > that want to convert an input string to a number may

Re: [PATCH -mm] Introduce strtol_check_range()

2007-08-01 Thread Satyam Sharma
Hi Alexey, On Wed, 1 Aug 2007, Alexey Dobriyan wrote: > On Tue, Jul 31, 2007 at 10:04:10PM +0530, Satyam Sharma wrote: > > Callers (especially "store" functions for sysfs or configfs attributes) > > that want to convert an input string to a number may often also want to > > check for simple

Re: [PATCH -mm] Introduce strtol_check_range()

2007-08-01 Thread Satyam Sharma
Hi Alexey, On Wed, 1 Aug 2007, Alexey Dobriyan wrote: On Tue, Jul 31, 2007 at 10:04:10PM +0530, Satyam Sharma wrote: Callers (especially store functions for sysfs or configfs attributes) that want to convert an input string to a number may often also want to check for simple input sanity

Re: [PATCH -mm] Introduce strtol_check_range()

2007-08-01 Thread Satyam Sharma
On Thu, 2 Aug 2007, Satyam Sharma wrote: On Wed, 1 Aug 2007, Alexey Dobriyan wrote: On Tue, Jul 31, 2007 at 10:04:10PM +0530, Satyam Sharma wrote: Callers (especially store functions for sysfs or configfs attributes) that want to convert an input string to a number may often also

Re: [PATCH -mm] Introduce strtol_check_range()

2007-08-01 Thread Alexey Dobriyan
On Thu, Aug 02, 2007 at 05:16:59AM +0530, Satyam Sharma wrote: On Wed, 1 Aug 2007, Alexey Dobriyan wrote: On Tue, Jul 31, 2007 at 10:04:10PM +0530, Satyam Sharma wrote: Callers (especially store functions for sysfs or configfs attributes) that want to convert an input string to a number

Re: [PATCH -mm] Introduce strtol_check_range()

2007-07-31 Thread Alexey Dobriyan
On Tue, Jul 31, 2007 at 10:04:10PM +0530, Satyam Sharma wrote: > Callers (especially "store" functions for sysfs or configfs attributes) > that want to convert an input string to a number may often also want to > check for simple input sanity or allowable range. strtol10_check_range() > of

Re: [PATCH -mm] Introduce strtol_check_range()

2007-07-31 Thread Andrew Morton
On Tue, 31 Jul 2007 22:04:10 +0530 (IST) Satyam Sharma <[EMAIL PROTECTED]> wrote: > [ checkpatch.pl doesn't particularly like this patch, but I wanted to be > consistent with the rest of lib/vsprintf.c and include/linux/kernel.h. ] I tend to think that it isn't worth being consistent with

[PATCH -mm] Introduce strtol_check_range()

2007-07-31 Thread Satyam Sharma
Callers (especially "store" functions for sysfs or configfs attributes) that want to convert an input string to a number may often also want to check for simple input sanity or allowable range. strtol10_check_range() of netconsole does this, so extract it out into lib/vsprintf.c, make it generic

[PATCH -mm] Introduce strtol_check_range()

2007-07-31 Thread Satyam Sharma
Callers (especially store functions for sysfs or configfs attributes) that want to convert an input string to a number may often also want to check for simple input sanity or allowable range. strtol10_check_range() of netconsole does this, so extract it out into lib/vsprintf.c, make it generic

Re: [PATCH -mm] Introduce strtol_check_range()

2007-07-31 Thread Andrew Morton
On Tue, 31 Jul 2007 22:04:10 +0530 (IST) Satyam Sharma [EMAIL PROTECTED] wrote: [ checkpatch.pl doesn't particularly like this patch, but I wanted to be consistent with the rest of lib/vsprintf.c and include/linux/kernel.h. ] I tend to think that it isn't worth being consistent with wrong

Re: [PATCH -mm] Introduce strtol_check_range()

2007-07-31 Thread Alexey Dobriyan
On Tue, Jul 31, 2007 at 10:04:10PM +0530, Satyam Sharma wrote: Callers (especially store functions for sysfs or configfs attributes) that want to convert an input string to a number may often also want to check for simple input sanity or allowable range. strtol10_check_range() of netconsole