diff options
author | 2020-03-09 04:38:46 +0000 | |
---|---|---|
committer | 2020-03-09 04:38:46 +0000 | |
commit | d7e7c465daca0f7ce4af740b2043f3ecfeba01f4 (patch) | |
tree | 8af2ef899c130c49387b86faefdea72913a3bb4b | |
parent | Rewrite qp_encoded_write. (diff) | |
download | wireguard-openbsd-d7e7c465daca0f7ce4af740b2043f3ecfeba01f4.tar.xz wireguard-openbsd-d7e7c465daca0f7ce4af740b2043f3ecfeba01f4.zip |
Update the console device always when attaching the real device
driver. The information by the driver is supposed more reliable than
the information which was set up earlier.
ok patrick
-rw-r--r-- | sys/dev/ic/com.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/ic/com.c b/sys/dev/ic/com.c index 0f2e6e4509b..0659a9d0600 100644 --- a/sys/dev/ic/com.c +++ b/sys/dev/ic/com.c @@ -1,4 +1,4 @@ -/* $OpenBSD: com.c,v 1.171 2020/02/05 10:21:17 mpi Exp $ */ +/* $OpenBSD: com.c,v 1.172 2020/03/09 04:38:46 yasuoka Exp $ */ /* $NetBSD: com.c,v 1.82.4.1 1996/06/02 09:08:00 mrg Exp $ */ /* @@ -1498,8 +1498,8 @@ com_attach_subr(struct com_softc *sc) if (cdevsw[maj].d_open == comopen) break; - if (maj < nchrdev && cn_tab->cn_dev == NODEV) - cn_tab->cn_dev = makedev(maj, sc->sc_dev.dv_unit); + KASSERT(maj < nchrdev); + cn_tab->cn_dev = makedev(maj, sc->sc_dev.dv_unit); printf("%s: console\n", sc->sc_dev.dv_xname); } |