In Linux, kernel parameters passed to ioctl are by value, while in FreeBSD
they are passed by reference. Handle the difference within the linux_ioctl_termio on the LINUX_TCFLSH path. Submitted by: Jaroslav Drzik <jaro_AT_coop-voz_dot_sk>
This commit is contained in:
parent
76cd6764a4
commit
53041c5448
@ -806,22 +806,22 @@ linux_ioctl_termio(struct thread *td, struct linux_ioctl_args *args)
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user