nmdm.c (93593) | nmdm.c (109623) |
---|---|
1/* 2 * Copyright (c) 1982, 1986, 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 16 unchanged lines hidden (view full) --- 25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * | 1/* 2 * Copyright (c) 1982, 1986, 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 16 unchanged lines hidden (view full) --- 25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * |
33 * $FreeBSD: head/sys/dev/nmdm/nmdm.c 93593 2002-04-01 21:31:13Z jhb $ | 33 * $FreeBSD: head/sys/dev/nmdm/nmdm.c 109623 2003-01-21 08:56:16Z alfred $ |
34 */ 35 36/* 37 * Pseudo-nulmodem driver 38 * Mighty handy for use with serial console in Vmware 39 */ 40 41#include "opt_compat.h" --- 86 unchanged lines hidden (view full) --- 128{ 129 dev_t dev1, dev2; 130 struct nm_softc *pt; 131 132 /* For now we only map the lower 8 bits of the minor */ 133 if (n & ~0xff) 134 return; 135 | 34 */ 35 36/* 37 * Pseudo-nulmodem driver 38 * Mighty handy for use with serial console in Vmware 39 */ 40 41#include "opt_compat.h" --- 86 unchanged lines hidden (view full) --- 128{ 129 dev_t dev1, dev2; 130 struct nm_softc *pt; 131 132 /* For now we only map the lower 8 bits of the minor */ 133 if (n & ~0xff) 134 return; 135 |
136 pt = malloc(sizeof(*pt), M_NLMDM, M_WAITOK); | 136 pt = malloc(sizeof(*pt), M_NLMDM, 0); |
137 bzero(pt, sizeof(*pt)); 138 pt->part1.dev = dev1 = make_dev(&nmdm_cdevsw, n+n, 139 0, 0, 0666, "nmdm%dA", n); 140 pt->part2.dev = dev2 = make_dev(&nmdm_cdevsw, n+n+1, 141 0, 0, 0666, "nmdm%dB", n); 142 143 dev1->si_drv1 = dev2->si_drv1 = pt; 144 dev1->si_tty = &pt->part1.nm_tty; --- 474 unchanged lines hidden --- | 137 bzero(pt, sizeof(*pt)); 138 pt->part1.dev = dev1 = make_dev(&nmdm_cdevsw, n+n, 139 0, 0, 0666, "nmdm%dA", n); 140 pt->part2.dev = dev2 = make_dev(&nmdm_cdevsw, n+n+1, 141 0, 0, 0666, "nmdm%dB", n); 142 143 dev1->si_drv1 = dev2->si_drv1 = pt; 144 dev1->si_tty = &pt->part1.nm_tty; --- 474 unchanged lines hidden --- |