Deleted Added
full compact
kern_cons.c (120456) kern_cons.c (120491)
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.

--- 25 unchanged lines hidden (view full) ---

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 */
40
41#include <sys/cdefs.h>
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.

--- 25 unchanged lines hidden (view full) ---

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 */
40
41#include <sys/cdefs.h>
42__FBSDID("$FreeBSD: head/sys/kern/tty_cons.c 120456 2003-09-26 07:26:54Z phk $");
42__FBSDID("$FreeBSD: head/sys/kern/tty_cons.c 120491 2003-09-26 19:35:50Z phk $");
43
44#include "opt_ddb.h"
45
46#include <sys/param.h>
47#include <sys/systm.h>
48#include <sys/conf.h>
49#include <sys/cons.h>
50#include <sys/fcntl.h>

--- 152 unchanged lines hidden (view full) ---

203 for (i = 0; i < CNDEVTAB_SIZE; i++) {
204 cnd = &cn_devtab[i];
205 if (cnd->cnd_cn == NULL)
206 break;
207 }
208 if (cnd->cnd_cn != NULL)
209 return (ENOMEM);
210 cnd->cnd_cn = cn;
43
44#include "opt_ddb.h"
45
46#include <sys/param.h>
47#include <sys/systm.h>
48#include <sys/conf.h>
49#include <sys/cons.h>
50#include <sys/fcntl.h>

--- 152 unchanged lines hidden (view full) ---

203 for (i = 0; i < CNDEVTAB_SIZE; i++) {
204 cnd = &cn_devtab[i];
205 if (cnd->cnd_cn == NULL)
206 break;
207 }
208 if (cnd->cnd_cn != NULL)
209 return (ENOMEM);
210 cnd->cnd_cn = cn;
211 if (cn->cn_name[0] == '\0' && cn->cn_dev != NULL) {
212 strcpy(cn->cn_name, devtoname(cn->cn_dev));
213 /* XXX: it is unclear if/where this print might output */
214 printf("NOTE: console \"%s\" didn't set name\n", cn->cn_name);
215 }
216 if (cn->cn_name[0] == '\0') {
217 /* XXX: it is unclear if/where this print might output */
218 printf("WARNING: console at %p has no name\n", cn);
219 }
220 STAILQ_INSERT_TAIL(&cn_devlist, cnd, cnd_next);
221 return (0);
222}
223

--- 452 unchanged lines hidden ---
211 if (cn->cn_name[0] == '\0') {
212 /* XXX: it is unclear if/where this print might output */
213 printf("WARNING: console at %p has no name\n", cn);
214 }
215 STAILQ_INSERT_TAIL(&cn_devlist, cnd, cnd_next);
216 return (0);
217}
218

--- 452 unchanged lines hidden ---