Turn '#if NSNP > 0' into an option.
This commit is contained in:
parent
03927d3c33
commit
810d0bd1a9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=71786
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 @@ ttread(tp, uio, flag)
|
||||
* 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 @@ ttread(tp, uio, flag)
|
||||
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 @@ ttwrite(tp, uio, flag)
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user