Re: [PATCH] zram: use scnprintf() in attrs show() methods

2014-03-09 Thread Minchan Kim
On Sun, Mar 09, 2014 at 10:27:08PM +0300, Sergey Senozhatsky wrote: > sysfs.txt documentation lists the following requirements: > > - The buffer will always be PAGE_SIZE bytes in length. On i386, this >is 4096. > > - show() methods should return the number of bytes printed into the >buf

[PATCH] zram: use scnprintf() in attrs show() methods

2014-03-09 Thread Sergey Senozhatsky
sysfs.txt documentation lists the following requirements: - The buffer will always be PAGE_SIZE bytes in length. On i386, this is 4096. - show() methods should return the number of bytes printed into the buffer. This is the return value of scnprintf(). - show() should always use scnprin