diff options
author | 2004-04-11 16:41:30 +0000 | |
---|---|---|
committer | 2004-04-11 16:41:30 +0000 | |
commit | 91acea069a98fc56131ed81b94b480a2acf56307 (patch) | |
tree | 42948d6279499d3d42518eb1f3305d1825f730d8 | |
parent | Use INQUIRY instead of TUR for PPR. By doing this the target device actually transfers data at the requested speed; in essence this is a poor-mans domain validation. Also some SCSI device are horribly out of spec and they won't respond correctly to TUR. ok krw@ (diff) | |
download | wireguard-openbsd-91acea069a98fc56131ed81b94b480a2acf56307.tar.xz wireguard-openbsd-91acea069a98fc56131ed81b94b480a2acf56307.zip |
Fix calculation of the index into TTY_LETTERS. This only worked
because sizeof(TTY_LETTERS) == sizeof(TTY_SUFFIX).
-rw-r--r-- | sys/kern/tty_pty.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c index f4cf902e880..5a4506f960e 100644 --- a/sys/kern/tty_pty.c +++ b/sys/kern/tty_pty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty_pty.c,v 1.20 2004/02/23 21:17:54 beck Exp $ */ +/* $OpenBSD: tty_pty.c,v 1.21 2004/04/11 16:41:30 millert Exp $ */ /* $NetBSD: tty_pty.c,v 1.33.4.1 1996/06/02 09:08:11 mrg Exp $ */ /* @@ -130,7 +130,7 @@ ptydevname(int minor, struct pt_softc *pti) char buf[11] = "/dev/XtyXX"; int i, j; - i = minor / (sizeof(TTY_LETTERS) - 1); + i = minor / (sizeof(TTY_SUFFIX) - 1); j = minor % (sizeof(TTY_SUFFIX) - 1); if (i >= sizeof(TTY_LETTERS) - 1) { pti->pty_pn[0] = '\0'; |