Subject: kern/1293: tags for the kernel
To: None <gnats-bugs@gnats.netbsd.org>
From: James Jegers <jimj@miller.cs.uwm.edu>
List: netbsd-bugs
Date: 07/28/1995 12:59:47
>Number:         1293
>Category:       kern
>Synopsis:       kernel tags
>Confidential:   yes
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Jul 28 14:05:03 1995
>Last-Modified:
>Originator:     James Jegers
>Organization:

>Release:        Current as of Jul 5<NetBSD-current source date>
>Environment:

System: NetBSD jimj.home.edu 1.0A NetBSD 1.0A (JIMJ) #4: Fri Jul 28 09:42:32 CDT 1995 jimj@jimj.home.edu:/usr/src/sys/arch/i386/compile/JIMJ i386

>Description:
	After looking at the libc tags and seeing how cool they are. I decided to
	create tags for the kernel.  It's a bit different design than the ones
	that were in the kernel but similar.
	I also changed /sys/net/bpf.c a bit so that ctags will correctly
	include all the functions in the file.
>How-To-Repeat:

>Fix:

    new file for /sys/conf/Make.tags.inc
---------------------------------------------------
# Common files for "make tags".
# Included by the Makefile

# Put the ../sys stuff near the end so that subroutine definitions win when
# there is a struct tag with the same name (eg., vmmeter).  The real
# solution would probably be for ctags to generate "struct vmmeter" tags.

COMMTAGS= \
	/sys/adosfs/*.[ch] \
	/sys/compat/common/*.[ch] /sys/compat/hpux/*.[ch] \
        /sys/compat/ibcs2/*.[ch] /sys/compat/linux/*.[ch] \
        /sys/compat/osf1/*.[ch] /sys/compat/sunos/*.[ch] \
	/sys/compat/svr4/*.[ch] /sys/compat/ultrix/*.[ch] \
        /sys/conf/*.[ch] \
        /sys/ddb/*.[ch] \
        /sys/dev/*.[ch] /sys/dev/ic/*.[ch] /sys/dev/eisa/*.[ch] \
        /sys/dev/isa/*.[ch] /sys/dev/pci/*.[ch] \
        /sys/isofs/cd9660/*.[ch] \
        /sys/kern/*.[ch] /sys/lib/libkern/*.[ch] \
        /sys/miscfs/*/*.[ch] \
        /sys/msdosfs/*.[ch] \
        /sys/net/*.[ch] /sys/netccitt/*.[ch] /sys/netinet/*.[ch] \
        /sys/netiso/*.[ch] /sys/netns/*.[ch] \
        /sys/nfs/*.[ch] \
        /sys/scsi/*.[ch] \
        /sys/sys/*.[h] \
        /sys/ufs/*/*.[ch] \
        /sys/vm/*.[ch]
-0--------------------------------------------------
  a new /sys/arch/i386/Makefile

#       $NetBSD: Makefile,v 1.8 1994/10/27 04:14:23 cgd Exp $
#       @(#)Makefile    7.3 (Berkeley) 6/9/91

# Makefile for i386 tags file and boot blocks

NOPROG= noprog
NOMAN=  noman

SUBDIR= boot

# Tags Assembler files
AI386=  i386/*.s

# Tags Regular C and header files
SI386=  i386/*.[ch] include/*.h isa/*.[ch] pci/*.[ch]

# Directories in which to place i386 tags links
DI386=  i386 include isa pci

tags:
        -ctags -dt ${SI386} ${COMMTAGS}
        egrep "^ENTRY(.*)|^ALTENTRY(.*)" ${AI386} | \
            sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/;" \
                >> tags
        sort -o tags tags

links:
        -for i in ${DI386}; do \
            (cd $$i && rm -f tags; ln -s ../tags tags); done

obj: _SUBDIRUSE

.include "../../conf/Make.tags.inc"
.include <bsd.prog.mk>


-0--------------------------------------------------
*** bpf.c       Tue Jun  6 10:40:01 1995
--- bpf.c.new   Wed Jul 12 11:42:31 1995
***************
*** 201,211 ****
        if (len > MLEN) {
  #if BSD >= 199103
                MCLGET(m, M_WAIT);
!               if ((m->m_flags & M_EXT) == 0) {
  #else
                MCLGET(m);
!               if (m->m_len != MCLBYTES) {
  #endif
                        error = ENOBUFS;
                        goto bad;
                }
--- 201,212 ----
        if (len > MLEN) {
  #if BSD >= 199103
                MCLGET(m, M_WAIT);
!               if ((m->m_flags & M_EXT) == 0)
  #else
                MCLGET(m);
!               if (m->m_len != MCLBYTES)
  #endif
+               {
                        error = ENOBUFS;
                        goto bad;
                }

>Audit-Trail:
>Unformatted: