Skip to content

Commit

Permalink
zorro: Fix reading of proc/bus/zorro/* in small chunks
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Geert Uytterhoeven committed Aug 9, 2010
1 parent d50ac46 commit 2190a1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/zorro/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 2190a1e

Please sign in to comment.