Date: Mon, 28 Nov 2005 14:58:26 +0100 From: Jaroslav Drzik <jaro@coop-voz.sk> To: freebsd-emulation@freebsd.org Subject: [PATCH] linux TCFLSH ioctl Message-ID: <20051128135826.GA1068@linux.coop>
index | next in thread | raw e-mail
[-- Attachment #1 --]
Hi
In FreeBSD-6.0-RELEASE is a problem in linux emulation layer
with emulation of linux ioctl TCFLSH.
In Linux kernel parameter to ioctl is passed as value.
In FreeBSD kernel parameter is passed as reference to value.
The emulation layer was passing parameter to Freebsd ioctl through
value and thus was not working.
Attached patch is against 6.0-RELEASE
Jaro
[-- Attachment #2 --]
--- compat/linux/linux_ioctl.c.orig Fri Sep 2 05:52:28 2005
+++ compat/linux/linux_ioctl.c Thu Nov 24 20:56:25 2005
@@ -806,22 +806,22 @@
}
case LINUX_TCFLSH: {
- args->cmd = TIOCFLUSH;
+ int val;
switch (args->arg) {
case LINUX_TCIFLUSH:
- args->arg = FREAD;
+ val = FREAD;
break;
case LINUX_TCOFLUSH:
- args->arg = FWRITE;
+ val = FWRITE;
break;
case LINUX_TCIOFLUSH:
- args->arg = FREAD | FWRITE;
+ val = FREAD | FWRITE;
break;
default:
fdrop(fp, td);
return (EINVAL);
}
- error = (ioctl(td, (struct ioctl_args *)args));
+ error = (fo_ioctl(fp,TIOCFLUSH,(caddr_t)&val,td->td_ucred,td));
break;
}
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051128135826.GA1068>
