Bug 27481

Summary: [PATCH] to make snp(4) a module
Product: Base System Reporter: dd <dd>
Component: kernAssignee: dd <dd>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description dd freebsd_committer freebsd_triage 2001-05-21 00:50:01 UTC
Right now, snp(4) can't be compiled as a module because it depends on
hacks in the tty subsystem similar to the following:
 
        #ifdef DEV_SNP 
                        if (ISSET(tp->t_state, TS_SNOOP) && tp->t_sc != NULL)
                                snpin((struct snoop *)tp->t_sc, cp, cc);
        #endif

snpin() is a function in snp(4), so it's not simply a matter of
removing the #ifdef's.

Attached is a patch that converts snp(4) to use line disciplines to
get the information it needs.  I'm not sure if it's entirely
appropriate to use line disciplines this way, but I think it's a lot
better than the above code, and it has the fortunate sideaffect that
snp(4) can be built as a module.  If this gets accepted I'll submit
patches to remove the aforementioned tty hacks.

Fix: I've sent this to both -hackers and -audit; nobody replied.  I take
this to mean that nobody cares, and my use of line disciplines isn't
evil enough to warrant attention.

If somebody just wants to review this so I can commit it (I'm not a
src/ committer) that'd be fine, too.
Comment 1 Brian Somers freebsd_committer freebsd_triage 2001-05-21 12:02:31 UTC
Responsible Changed
From-To: freebsd-bugs->dd

Dima should just commit this - maybe with a lines saying ``Reviewed by: silence on -arch and silence on -committers''.
Comment 2 dd freebsd_committer freebsd_triage 2001-05-25 01:22:12 UTC
State Changed
From-To: open->closed

Committed my own patch.