diff options
-rw-r--r-- | sys/conf/files | 2 | ||||
-rw-r--r-- | sys/conf/options | 3 | ||||
-rw-r--r-- | sys/kern/tty.c | 12 |
3 files changed, 10 insertions, 7 deletions
diff --git a/sys/conf/files b/sys/conf/files index 0fdbe4c..94469ae 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -693,7 +693,7 @@ kern/tty_compat.c standard kern/tty_conf.c standard kern/tty_cons.c standard kern/tty_pty.c optional pty -kern/tty_snoop.c count snp +kern/tty_snoop.c optional snp kern/tty_subr.c standard kern/tty_tty.c standard kern/uipc_accf.c optional inet diff --git a/sys/conf/options b/sys/conf/options index af104ee..988c399 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -485,3 +485,6 @@ ACPI_NO_ENABLE_ON_BOOT opt_acpi.h # options for DEVFS, see sys/fs/devfs/devfs.h NDEVFSINO opt_devfs.h NDEVFSOVERFLOW opt_devfs.h + +# various 'device presence' options. +DEV_SNP opt_snp.h diff --git a/sys/kern/tty.c b/sys/kern/tty.c index d750daa..f4fe297 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -67,7 +67,7 @@ * only when _all_ openers leave open(). */ -#include "snp.h" +#include "opt_snp.h" #include "opt_compat.h" #include "opt_uconsole.h" @@ -91,7 +91,7 @@ #include <sys/resourcevar.h> #include <sys/malloc.h> #include <sys/filedesc.h> -#if NSNP > 0 +#ifdef DEV_SNP #include <sys/snoop.h> #endif #include <sys/sysctl.h> @@ -254,7 +254,7 @@ ttyclose(tp) clist_free_cblocks(&tp->t_outq); clist_free_cblocks(&tp->t_rawq); -#if NSNP > 0 +#ifdef DEV_SNP if (ISSET(tp->t_state, TS_SNOOP) && tp->t_sc != NULL) snpdown((struct snoop *)tp->t_sc); #endif @@ -1612,7 +1612,7 @@ read: * XXX if there was an error then we should ungetc() the * unmoved chars and reduce icc here. */ -#if NSNP > 0 +#ifdef DEV_SNP if (ISSET(tp->t_lflag, ECHO) && ISSET(tp->t_state, TS_SNOOP) && tp->t_sc != NULL) snpin((struct snoop *)tp->t_sc, ibuf, icc); @@ -1659,7 +1659,7 @@ slowcase: if (error) /* XXX should ungetc(c, qp). */ break; -#if NSNP > 0 +#ifdef DEV_SNP /* * Only snoop directly on input in echo mode. Non-echoed * input will be snooped later iff the application echoes it. @@ -1812,7 +1812,7 @@ loop: cc = 0; break; } -#if NSNP > 0 +#ifdef DEV_SNP if (ISSET(tp->t_state, TS_SNOOP) && tp->t_sc != NULL) snpin((struct snoop *)tp->t_sc, cp, cc); #endif |