patch-2.4.27 linux-2.4.27/arch/ia64/kernel/efivars.c
Next file: linux-2.4.27/arch/ia64/kernel/palinfo.c
Previous file: linux-2.4.27/arch/ia64/kernel/efi.c
Back to the patch index
Back to the overall index
- Lines: 34
- Date:
2004-08-07 16:26:04.570343326 -0700
- Orig file:
linux-2.4.26/arch/ia64/kernel/efivars.c
- Orig date:
2003-11-28 10:26:19.000000000 -0800
diff -urN linux-2.4.26/arch/ia64/kernel/efivars.c linux-2.4.27/arch/ia64/kernel/efivars.c
@@ -364,6 +364,7 @@
int ret;
const int max_nr_entries = 7; /* num ptrs to tables we could expose */
const int max_line_len = 80;
+ loff_t pos = *ppos;
if (!efi.systab)
return 0;
@@ -388,13 +389,13 @@
if (efi.boot_info)
length += sprintf(proc_buffer + length, "BOOTINFO=0x%lx\n", __pa(efi.boot_info));
- if (*ppos >= length) {
+ if (pos != (unsigned) pos || pos >= length) {
ret = 0;
goto out;
}
- data = proc_buffer + file->f_pos;
- size = length - file->f_pos;
+ data = proc_buffer + pos;
+ size = length - pos;
if (size > count)
size = count;
if (copy_to_user(buffer, data, size)) {
@@ -402,7 +403,7 @@
goto out;
}
- *ppos += size;
+ *ppos = pos + size;
ret = size;
out:
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)