Subject: Re: Adding /proc/swaps to linux compat code
To: Arnaud Lacombe <arnaud.lacombe.1@ulaval.ca>
From: Christos Zoulas <christos@zoulas.com>
List: tech-kern
Date: 01/31/2007 12:53:42
On Jan 31, 12:20pm, arnaud.lacombe.1@ulaval.ca (Arnaud Lacombe) wrote:
-- Subject: Re: Adding /proc/swaps to linux compat code
| patch updated (same url).
|
| On Wed, Jan 31, 2007 at 04:43:42PM +0000, Christos Zoulas wrote:
| > - Don't cast the result of malloc.
| done
You did the first, not the second.
| > - Assign buflen to LBFSZ in the beginning and use buflen from now on,
| > instead of of LBFSZ.
| done
not really. I meant also in:
+ len = snprintf(buf, LBFSZ,
+ "Filename\t\t\t\tType\t\tSize\tUsed\tPriority\n");
+ remaining = LBFSZ - len;
or just get rid of buflen.
|
| > - Missing spaces count=nswap, should be changed anyway read on.
| > - count should be register_t, and you should check it against nswap
| > and use it if <= instead of ignoring it.
| oups :/ some fallout of debugging :)
that's better :-)
| > - it would be nice to have an api to get the blocksize... but this is
| > ok for now.
| I'll have a look at it this week-end
Maybe it belongs in struct swapent? I don't know. I did not look at
it carefully.
| btw, is there a reason to compile linux /proc stuff even when
| COMPAT_LINUX is commented in config file ?
I think for LKM's.
christos