Date: Sun, 29 Apr 2001 07:10:05 -0700 (PDT) From: Boris Nikolaus <bn@dali.tellique.de> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/23173: read hangs in linux emulation Message-ID: <200104291410.f3TEA5N13031@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/23173; it has been noted by GNATS.
From: Boris Nikolaus <bn@dali.tellique.de>
To: freebsd-gnats-submit@FreeBSD.org
Cc: bbl@dk.damgaard.com, marcel@FreeBSD.org
Subject: Re: kern/23173: read hangs in linux emulation
Date: Sun, 29 Apr 2001 04:36:05 +0200
Hi Bjarne.
There's a bug in the termios struct conversion, which replaces
0 in VMIN and VTIME by 255 (as it substitutes all _POSIX_VDISABLE from
Linux (0) by _POSIX_VDISABLE from FreeBSD (255) in termios.c_cc[]).
The following patch for /usr/src/sys/compat/linux/linux_ioctl.c will fix
this problem:
*** linux_ioctl.c.orig Sat Apr 28 03:08:21 2001
--- linux_ioctl.c Sun Apr 29 04:22:10 2001
***************
*** 321,327 ****
lios->c_cc[LINUX_VLNEXT] = bios->c_cc[VLNEXT];
for (i=0; i<LINUX_NCCS; i++) {
! if (lios->c_cc[i] == _POSIX_VDISABLE)
lios->c_cc[i] = LINUX_POSIX_VDISABLE;
}
lios->c_line = 0;
--- 321,328 ----
lios->c_cc[LINUX_VLNEXT] = bios->c_cc[VLNEXT];
for (i=0; i<LINUX_NCCS; i++) {
! if (i != LINUX_VMIN && i != LINUX_VTIME &&
! lios->c_cc[i] == _POSIX_VDISABLE)
lios->c_cc[i] = LINUX_POSIX_VDISABLE;
}
lios->c_line = 0;
***************
*** 454,460 ****
bios->c_cc[VLNEXT] = lios->c_cc[LINUX_VLNEXT];
for (i=0; i<NCCS; i++) {
! if (bios->c_cc[i] == LINUX_POSIX_VDISABLE)
bios->c_cc[i] = _POSIX_VDISABLE;
}
--- 455,462 ----
bios->c_cc[VLNEXT] = lios->c_cc[LINUX_VLNEXT];
for (i=0; i<NCCS; i++) {
! if (i != VMIN && i != VTIME &&
! bios->c_cc[i] == LINUX_POSIX_VDISABLE)
bios->c_cc[i] = _POSIX_VDISABLE;
}
Greetings,
Boris Nikolaus
P.S.: Your test program is missing a "st_tbuf = old_st;" after the tcgetattr.
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200104291410.f3TEA5N13031>
