Date: Tue, 23 Feb 2010 22:50:10 +0100 From: Juergen Lock <nox@jelal.kn-bremen.de> To: freebsd-emulation@FreeBSD.org Cc: freebsd-hackers@FreeBSD.org, Tim Kientzle <kientzle@FreeBSD.org> Subject: Linuxolator patches: stat and lseek SEEK_END for disk devices Message-ID: <20100223215010.GA67619@triton8.kn-bremen.de>
next in thread | raw e-mail | index | archive | help
Hi! Before this gets buried on -hackers in another thead... :) I now have disks appear as block devices for Linux processes (there already was commented out code for that in linux_stats.c, I hope my version is now `correct enough' to be usable [1]), and I made a simple patch to make lseek SEEK_END (L_XTND in the source) dtrt on disk devices too by simply invoking the DIOCGMEDIASIZE ioctl there; [2] both of these things are what (some) Linux processes expect. Patches are here: (made on stable/8, if they don't apply on head I'll have to make extra versions for that...) http://people.freebsd.org/~nox/linuxdisk-blk.patch [1] http://people.freebsd.org/~nox/lseek-seek_end.patch [2] And yes, with these patches the Linux bsdtar mentioned on -hackers in the `"tar tfv /dev/cd0" speedup patch' thread now also runs fast on FreeBSD. :) Cheers, Juergen
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100223215010.GA67619>