Unifdef DEV_SNP; snp(4) no longer requires these ugly hacks.
Silence by: -hackers, -audit
This commit is contained in:
parent
47eaa5f542
commit
0150c6e83d
@ -67,7 +67,6 @@
|
||||
* only when _all_ openers leave open().
|
||||
*/
|
||||
|
||||
#include "opt_snp.h"
|
||||
#include "opt_compat.h"
|
||||
#include "opt_uconsole.h"
|
||||
|
||||
@ -93,9 +92,6 @@
|
||||
#include <sys/resourcevar.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/filedesc.h>
|
||||
#ifdef DEV_SNP
|
||||
#include <sys/snoop.h>
|
||||
#endif
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
#include <vm/vm.h>
|
||||
@ -259,11 +255,6 @@ ttyclose(tp)
|
||||
clist_free_cblocks(&tp->t_outq);
|
||||
clist_free_cblocks(&tp->t_rawq);
|
||||
|
||||
#ifdef DEV_SNP
|
||||
if (ISSET(tp->t_state, TS_SNOOP) && tp->t_sc != NULL)
|
||||
snpdown((struct snoop *)tp->t_sc);
|
||||
#endif
|
||||
|
||||
tp->t_gen++;
|
||||
tp->t_line = TTYDISC;
|
||||
tp->t_pgrp = NULL;
|
||||
@ -1716,11 +1707,6 @@ ttread(tp, uio, flag)
|
||||
* XXX if there was an error then we should ungetc() the
|
||||
* unmoved chars and reduce icc here.
|
||||
*/
|
||||
#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);
|
||||
#endif
|
||||
if (error)
|
||||
break;
|
||||
if (uio->uio_resid == 0)
|
||||
@ -1763,15 +1749,6 @@ ttread(tp, uio, flag)
|
||||
if (error)
|
||||
/* XXX should ungetc(c, qp). */
|
||||
break;
|
||||
#ifdef DEV_SNP
|
||||
/*
|
||||
* Only snoop directly on input in echo mode. Non-echoed
|
||||
* input will be snooped later iff the application echoes it.
|
||||
*/
|
||||
if (ISSET(tp->t_lflag, ECHO) &&
|
||||
ISSET(tp->t_state, TS_SNOOP) && tp->t_sc != NULL)
|
||||
snpinc((struct snoop *)tp->t_sc, (char)c);
|
||||
#endif
|
||||
if (uio->uio_resid == 0)
|
||||
break;
|
||||
/*
|
||||
@ -1916,10 +1893,6 @@ ttwrite(tp, uio, flag)
|
||||
cc = 0;
|
||||
break;
|
||||
}
|
||||
#ifdef DEV_SNP
|
||||
if (ISSET(tp->t_state, TS_SNOOP) && tp->t_sc != NULL)
|
||||
snpin((struct snoop *)tp->t_sc, cp, cc);
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
* If nothing fancy need be done, grab those characters we
|
||||
|
Loading…
Reference in New Issue
Block a user