Re: [RFC 01/11] add generic versions of debugfs file operations

2008-02-24 Thread Arnd Bergmann
On Saturday 23 February 2008, Al Viro wrote: Ewww - caps, \n... BTW, \0 is pointless here - simple_read_from_buffer() will not access it with these arguments)... ... Please, check the length; sloppy input grammar is a bad idea. Hell, at the very least you want -EINVAL if input is not

Re: [RFC 01/11] add generic versions of debugfs file operations

2008-02-24 Thread Greg KH
On Sun, Feb 24, 2008 at 11:46:07AM +0100, Arnd Bergmann wrote: On Saturday 23 February 2008, Al Viro wrote: Ewww - caps, \n... BTW, \0 is pointless here - simple_read_from_buffer() will not access it with these arguments)... ... Please, check the length; sloppy input grammar is

Re: [RFC 01/11] add generic versions of debugfs file operations

2008-02-23 Thread Al Viro
On Tue, Feb 19, 2008 at 05:04:36AM +0100, Arnd Bergmann wrote: + char buf[3]; + u32 *val = file-private_data; + + if (*val) + buf[0] = 'Y'; + else + buf[0] = 'N'; + buf[1] = '\n'; + buf[2] = 0x00; + return

Re: [RFC 01/11] add generic versions of debugfs file operations

2008-02-23 Thread Al Viro
On Tue, Feb 19, 2008 at 05:04:36AM +0100, Arnd Bergmann wrote: The file operations in debugfs are rather generic and can be used by other file systems, so it can be interesting to include them in libfs, with more generic names, and exported to modules. This patch adds a new copy of these

[RFC 01/11] add generic versions of debugfs file operations

2008-02-18 Thread Arnd Bergmann
The file operations in debugfs are rather generic and can be used by other file systems, so it can be interesting to include them in libfs, with more generic names, and exported to modules. This patch adds a new copy of these operations to libfs, so that the debugfs version can later be cut down.