PR/48720: John Kelly: com driver does not allow B0 to be set. The code to

handle B0 was commented out for no reason given at revision 1.99. POSIX
mandates to hangup on B0:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/tcsetattr.html
This commit is contained in:
christos 2014-04-06 23:29:58 +00:00
parent 020a8485e4
commit 4cd4dee55a
1 changed files with 4 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: com.c,v 1.323 2014/03/16 05:20:27 dholland Exp $ */
/* $NetBSD: com.c,v 1.324 2014/04/06 23:29:58 christos Exp $ */
/*-
* Copyright (c) 1998, 1999, 2004, 2008 The NetBSD Foundation, Inc.
@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.323 2014/03/16 05:20:27 dholland Exp $");
__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.324 2014/04/06 23:29:58 christos Exp $");
#include "opt_com.h"
#include "opt_ddb.h"
@ -296,11 +296,9 @@ comspeed(long speed, long frequency, int type)
divisor = 13;
}
#if 0
if (speed == 0)
return (0);
#endif
if (speed <= 0)
if (speed < 0)
return (-1);
x = divrnd(frequency / divisor, speed);
if (x <= 0)
@ -1426,9 +1424,9 @@ comparam(struct tty *tp, struct termios *t)
}
sc->sc_msr_mask = sc->sc_msr_cts | sc->sc_msr_dcd;
#if 0
if (ospeed == 0)
CLR(sc->sc_mcr, sc->sc_mcr_dtr);
#if 0
else
SET(sc->sc_mcr, sc->sc_mcr_dtr);
#endif