Re: CTL_*_NAMES macros

2018-08-21 Thread Masanobu SAITOH

rjs@ wrote:


Masanobu SAITOH  wrote:

% egrep -r 'CTL_.*_NAMES' .
./sys/arch/m68k/include/sysctl.h:#ifndef CTL_MACHDEP_NAMES
./sys/arch/m68k/include/sysctl.h:#endif /* CTL_MACHDEP_NAMES */


These are not examples of sysctl counter names, they are just the
multiple inclusion prevention symbols for that file.


In reality, CTL_MACHDEP_NAMES was not defined from anywhere :(
I cleaned up the m68k's CPU_* macros for CTL_MACHDEP sysctl
by moving them into m68k/include/cpu.h


On 2018/08/11 17:39, Christos Zoulas wrote:

In article <41393cac-bf42-08dd-da98-4d4fabbd5...@execsw.org>,
Masanobu SAITOH   wrote:


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



Let's remove them.


 Done!


christos




--
---
SAITOH Masanobu (msai...@execsw.org
 msai...@netbsd.org)


Re: CTL_*_NAMES macros

2018-08-11 Thread Christos Zoulas
In article <986a7f16-545e-817d-4756-6ca8b3d23...@gmx.com>,
Kamil Rytarowski   wrote:
>
>I propose to drop the following symbols from sys/sysctl.h:
>
>#define P_PAXMPROTECT   0x0800
>#define P_PAXNOMPROTECT 0x1000

Yes, go for it.

christos



Re: CTL_*_NAMES macros

2018-08-11 Thread Christos Zoulas
In article <41393cac-bf42-08dd-da98-4d4fabbd5...@execsw.org>,
Masanobu SAITOH   wrote:

>> 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
>

Let's remove them.

christos



Re: CTL_*_NAMES macros

2018-08-10 Thread Robert Swindells


Masanobu SAITOH  wrote:
> % egrep -r 'CTL_.*_NAMES' .
> ./sys/arch/m68k/include/sysctl.h:#ifndef CTL_MACHDEP_NAMES
> ./sys/arch/m68k/include/sysctl.h:#endif /* CTL_MACHDEP_NAMES */

These are not examples of sysctl counter names, they are just the
multiple inclusion prevention symbols for that file.


Re: CTL_*_NAMES macros

2018-08-10 Thread Kamil Rytarowski
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  */
>> ./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   0x0800
#define P_PAXNOMPROTECT 0x1000


Rationale is that they are unused.



signature.asc
Description: OpenPGP digital signature


Re: CTL_*_NAMES macros

2018-08-10 Thread Masanobu SAITOH

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 
 */
./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 (msai...@execsw.org
 msai...@netbsd.org)