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

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

30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * from: @(#)cons.c 7.2 (Berkeley) 5/9/91
35 */
36
37#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.

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

30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * from: @(#)cons.c 7.2 (Berkeley) 5/9/91
35 */
36
37#include <sys/cdefs.h>
38__FBSDID("$FreeBSD: head/sys/kern/kern_cons.c 211102 2010-08-09 14:48:31Z gavin $");
38__FBSDID("$FreeBSD: head/sys/kern/kern_cons.c 228631 2011-12-17 15:08:43Z avg $");
39
40#include "opt_ddb.h"
41
42#include <sys/param.h>
43#include <sys/systm.h>
44#include <sys/lock.h>
45#include <sys/mutex.h>
46#include <sys/conf.h>

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

339 return (error);
340 return (error);
341}
342
343SYSCTL_PROC(_kern, OID_AUTO, consmute, CTLTYPE_INT|CTLFLAG_RW,
344 0, sizeof(cn_mute), sysctl_kern_consmute, "I",
345 "State of the console muting");
346
39
40#include "opt_ddb.h"
41
42#include <sys/param.h>
43#include <sys/systm.h>
44#include <sys/lock.h>
45#include <sys/mutex.h>
46#include <sys/conf.h>

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

339 return (error);
340 return (error);
341}
342
343SYSCTL_PROC(_kern, OID_AUTO, consmute, CTLTYPE_INT|CTLFLAG_RW,
344 0, sizeof(cn_mute), sysctl_kern_consmute, "I",
345 "State of the console muting");
346
347void
348cngrab()
349{
350 struct cn_device *cnd;
351 struct consdev *cn;
352
353 STAILQ_FOREACH(cnd, &cn_devlist, cnd_next) {
354 cn = cnd->cnd_cn;
355 if (!kdb_active || !(cn->cn_flags & CN_FLAG_NODEBUG))
356 cn->cn_ops->cn_grab(cn);
357 }
358}
359
360void
361cnungrab()
362{
363 struct cn_device *cnd;
364 struct consdev *cn;
365
366 STAILQ_FOREACH(cnd, &cn_devlist, cnd_next) {
367 cn = cnd->cnd_cn;
368 if (!kdb_active || !(cn->cn_flags & CN_FLAG_NODEBUG))
369 cn->cn_ops->cn_ungrab(cn);
370 }
371}
372
347/*
348 * Low level console routines.
349 */
350int
351cngetc(void)
352{
353 int c;
354

--- 209 unchanged lines hidden ---
373/*
374 * Low level console routines.
375 */
376int
377cngetc(void)
378{
379 int c;
380

--- 209 unchanged lines hidden ---