tech-kern archive

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

New tools proposal: ioctlname and ioctldecode



I propose to add two new tools:

 - ioctlname
 - ioctldecode

Both of them are a special mode embedded into kdump(1).

From time to time there is need to decode IOCTL codes and there is no
(as far as I am aware) easy tool to do so.

ioctlname is already invented and it calls the internal function
ioctldecode().

commit f551b480cd03a35cec2a4927270c00cfaa508a27
Author: christos <christos%NetBSD.org@localhost>
Date:   Mon Apr 13 14:39:23 2009 +0000

    Allow kdump to be used as an ioctl decoder if invoked as ioctlname.



Today the internal/hidden program ioctlname produces something like:
"_IOW('W',0x2,0x10)".

I propose to rename this program to ioctldecode and change ioctlname to
print a descriptive operation name as received by the ioctlname() function.

$ ioctldecode 2148554498
_IOW('W',0x2,0x10)

$ ioctlname 2148554498
WSKBDIO_COMPLEXBELL

I propose to install both programs and add appropriate man-pages.

A functional patch is here:

http://netbsd.org/~kamil/patch-00245-kdump-ioctlname.2.txt


Home | Main Index | Thread Index | Old Index