On 2019/02/28 16:54, matthew green wrote:
Iain Hibbert writes:
On Thu, 28 Feb 2019, Masanobu SAITOH wrote:

  I'd like to get new number for new ioctl. How should I find unused number
for it? I'm going to add new SIOCXXX. It may not enough to grep sys/net/*.h,
so I made usr.bin/kdump-ioctl.c and did

        grep \'i kdump-ioctl.c | sort -n -k 5,5 | uniq | column -t

I think it might not enough because kdump-ioctl.c has no compat-related
code.

  What should I do?

In most cases, an ioctl value is only valid when performed on a handle
leading to a specific subsystem, meaning that it does not really need to
be globally distinct.

Yes, you're correct.

There is a list of the letters used in ioctl(9)

true that that don't _need_ to be globally unique, but it sure
is nice for kdump(1).

Yes, it's also correct. It's better to unique than overlap.

.mrg.

 Currently, kdump-ioctl.c doesn't include compat ioctl. If I mistakenly
choose new value which is used in the compat code, it would cause trouble.
If we can include compat stuff into kdump, it would be good for user
to know about the old syscall's behavior and it also good to check
system-wide ioctl number usage...

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

Reply via email to