mirror of
https://github.com/torvalds/linux.git
synced 2024-12-29 06:12:08 +00:00
zorro: Fix reading of proc/bus/zorro/* in small chunks
proc_bus_zorro_read() didn't take into account the current file position, hence it always read from the start of the ConfigDev. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
This commit is contained in:
parent
d50ac468dd
commit
2190a1e770
@ -68,7 +68,7 @@ proc_bus_zorro_read(struct file *file, char __user *buf, size_t nbytes, loff_t *
|
||||
cd.cd_BoardAddr = (void *)zorro_resource_start(z);
|
||||
cd.cd_BoardSize = zorro_resource_len(z);
|
||||
|
||||
if (copy_to_user(buf, &cd, nbytes))
|
||||
if (copy_to_user(buf, (void *)&cd + pos, nbytes))
|
||||
return -EFAULT;
|
||||
*ppos += nbytes;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user