Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CTL_*_NAMES macros



On 2018/08/10 17:22, Masanobu SAITOH wrote:
  Hi.

  While debugging some counters which can be taken from sysctl,
I've noticed that some macros are not used from anywhere.

% egrep -r 'CTL_.*_NAMES' .
./sys/arch/m68k/include/sysctl.h:#ifndef CTL_MACHDEP_NAMES
./sys/arch/m68k/include/sysctl.h:#endif /* CTL_MACHDEP_NAMES */
./sys/net/if.h:#define CTL_IFQ_NAMES  { \
./sys/netinet/in.h:#define      CTL_IPPROTO_NAMES { \
./sys/netinet6/in6.h:#define CTL_IPV6PROTO_NAMES { \
./sys/sys/mbuf.h:#define        CTL_MBUF_NAMES {                                                \
./sys/sys/mount.h:#define       CTL_VFS_NAMES { \
./sys/sys/mount.h:#define       CTL_VFSGENCTL_NAMES { \
./sys/sys/pipe.h:#define        CTL_PIPE_NAMES { \
./sys/sys/socket.h:#define CTL_NET_NAMES { \
./sys/sys/socket.h:#define CTL_NET_RT_NAMES { \
./sys/sys/sysctl.h:#define      CTL_KERN_NAMES { \
./sys/sys/sysctl.h:#define      CTL_HW_NAMES { \
./sys/sys/sysctl.h:#define      CTL_USER_NAMES { \
./sys/sys/sysctl.h:#define      CTL_DDB_NAMES { \
./sys/uvm/uvm_param.h:#define   CTL_VM_NAMES { \
./usr.bin/nfsstat/nfsstat.c:            mib[1] = 2;     /* XXX from CTL_VFS_NAMES in <sys/mount.h> */
./external/bsd/libpcap/dist/ieee80211.h:#define IEEE80211_CTL_SUBTYPE_NAMES {                   \

Are these required?
Are these maintained?
Can we remove these macros?

The following changes are related:
http://mail-index.netbsd.org/source-changes/2003/12/04/msg138991.html
http://mail-index.netbsd.org/source-changes/2003/12/04/msg138992.html
http://mail-index.netbsd.org/source-changes/2003/12/04/msg138993.html
http://mail-index.netbsd.org/source-changes/2003/12/04/msg138994.html
http://mail-index.netbsd.org/source-changes/2003/12/04/msg138995.html
http://mail-index.netbsd.org/source-changes/2003/12/04/msg138996.html
http://mail-index.netbsd.org/source-changes/2003/12/04/msg138997.html
http://mail-index.netbsd.org/source-changes/2003/12/04/msg138998.html
http://mail-index.netbsd.org/source-changes/2003/12/04/msg138999.html

It seems FreeBSD removed those macros in the following commit:

	https://svnweb.freebsd.org/base?view=revision&revision=254925


--
-----------------------------------------------
                SAITOH Masanobu (msaitoh%execsw.org@localhost
                                 msaitoh%netbsd.org@localhost)


Home | Main Index | Thread Index | Old Index