summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorNick Pollitt <npollitt@engr.sgi.com>2000-10-26 23:12:05 +0000
committerNick Pollitt <npollitt@engr.sgi.com>2000-10-26 23:12:05 +0000
commitdd5e8b370b28b3b353de3f701a2aad875e9ee642 (patch)
tree98cab95e8f4c4be407ce16cd9344aa05e23e0638 /fs
parentda90616f5c642bad059b2637b94255cda1ffa4d2 (diff)
Changed cpuinfo_read_proc to support >4K.
Diffstat (limited to 'fs')
-rw-r--r--fs/proc/proc_misc.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c
index 8ff300269..5e94c6aa5 100644
--- a/fs/proc/proc_misc.c
+++ b/fs/proc/proc_misc.c
@@ -45,7 +45,7 @@
* have a way to deal with that gracefully. Right now I used straightforward
* wrappers, but this needs further analysis wrt potential overflows.
*/
-extern int get_cpuinfo(char *);
+extern int get_cpuinfo(char *, char **, off_t, int);
extern int get_hardware_list(char *);
extern int get_stram_list(char *);
#ifdef CONFIG_DEBUG_MALLOC
@@ -216,12 +216,8 @@ static int version_read_proc(char *page, char **start, off_t off,
static int cpuinfo_read_proc(char *page, char **start, off_t off,
int count, int *eof, void *data)
{
- int len = get_cpuinfo(page);
- if (len <= off+count) *eof = 1;
- *start = page + off;
- len -= off;
- if (len>count) len = count;
- if (len<0) len = 0;
+ int len = get_cpuinfo(page, start, off, count);
+ if (len < count) *eof = 1;
return len;
}