Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2190a1e7 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven
Browse files

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: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
parent d50ac468
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;