kern_cons.c (107984) | kern_cons.c (109623) |
---|---|
1/* 2 * Copyright (c) 1988 University of Utah. 3 * Copyright (c) 1991 The Regents of the University of California. 4 * All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * the Systems Programming Group of the University of Utah Computer 8 * Science Department. --- 22 unchanged lines hidden (view full) --- 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * from: @(#)cons.c 7.2 (Berkeley) 5/9/91 | 1/* 2 * Copyright (c) 1988 University of Utah. 3 * Copyright (c) 1991 The Regents of the University of California. 4 * All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * the Systems Programming Group of the University of Utah Computer 8 * Science Department. --- 22 unchanged lines hidden (view full) --- 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * from: @(#)cons.c 7.2 (Berkeley) 5/9/91 |
39 * $FreeBSD: head/sys/kern/tty_cons.c 107984 2002-12-17 19:30:50Z phk $ | 39 * $FreeBSD: head/sys/kern/tty_cons.c 109623 2003-01-21 08:56:16Z alfred $ |
40 */ 41 42#include "opt_ddb.h" 43 44#include <sys/param.h> 45#include <sys/systm.h> 46#include <sys/conf.h> 47#include <sys/cons.h> --- 224 unchanged lines hidden (view full) --- 272 SET_FOREACH(list, cons_set) { 273 cp = *list; 274 if (cp->cn_dev != NULL) 275 len += strlen(devtoname(cp->cn_dev)) + 1; 276 } 277 STAILQ_FOREACH(cnd, &cn_devlist, cnd_next) 278 len += strlen(devtoname(cnd->cnd_cn->cn_dev)) + 1; 279 len = len > CNDEVPATHMAX ? len : CNDEVPATHMAX; | 40 */ 41 42#include "opt_ddb.h" 43 44#include <sys/param.h> 45#include <sys/systm.h> 46#include <sys/conf.h> 47#include <sys/cons.h> --- 224 unchanged lines hidden (view full) --- 272 SET_FOREACH(list, cons_set) { 273 cp = *list; 274 if (cp->cn_dev != NULL) 275 len += strlen(devtoname(cp->cn_dev)) + 1; 276 } 277 STAILQ_FOREACH(cnd, &cn_devlist, cnd_next) 278 len += strlen(devtoname(cnd->cnd_cn->cn_dev)) + 1; 279 len = len > CNDEVPATHMAX ? len : CNDEVPATHMAX; |
280 MALLOC(name, char *, len, M_TEMP, M_WAITOK | M_ZERO); | 280 MALLOC(name, char *, len, M_TEMP, M_ZERO); |
281 p = name; 282 STAILQ_FOREACH(cnd, &cn_devlist, cnd_next) 283 p += sprintf(p, "%s,", devtoname(cnd->cnd_cn->cn_dev)); 284 *p++ = '/'; 285 SET_FOREACH(list, cons_set) { 286 cp = *list; 287 if (cp->cn_dev != NULL) 288 p += sprintf(p, "%s,", devtoname(cp->cn_dev)); --- 310 unchanged lines hidden --- | 281 p = name; 282 STAILQ_FOREACH(cnd, &cn_devlist, cnd_next) 283 p += sprintf(p, "%s,", devtoname(cnd->cnd_cn->cn_dev)); 284 *p++ = '/'; 285 SET_FOREACH(list, cons_set) { 286 cp = *list; 287 if (cp->cn_dev != NULL) 288 p += sprintf(p, "%s,", devtoname(cp->cn_dev)); --- 310 unchanged lines hidden --- |