linux_statfs64() missing an argument??
davidt at yadt.co.uk
Sun Apr 8 19:38:21 UTC 2007
I've recently been trying to compile gentoo under FreeBSD
(in order, eventually, to compile OpenWRT), and ran in to a rather
confusing problem when trying to diagnose the reason "coreutils"
failed to build properly.
Eventually I tracked down the problem:
glibc calls the statfs64 syscall with (path, sizeof(struct statfs64), buf)
The linux_statfs64 emulated syscall in FreeBSD expects only (path, buf),
and returns EFAULT every time, as buf is always 0x54.
The attached patch adds the missing argument, and ensures it matches
sizeof(struct l_statfs64), returning EINVAL otherwise (is that the right
I'm currently recompiling my kernel to test this, but thought I'd see
if anyone had any comments on the patch as is, since I've probably done
something wrong, as I'm not too sure how the whole syscalls.master setup
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 7549 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20070408/45cadbb9/linux_statfs64.bin
More information about the freebsd-current