On 10.08.2018 10: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
>
I propose to drop the following symbols from sys/sysctl.h:
#define P_PAXMPROTECT 0x08000000
#define P_PAXNOMPROTECT 0x10000000
Rationale is that they are unused.
Attachment:
signature.asc
Description: OpenPGP digital signature