Proposing tapset MAJOR(), MINOR(), and MKDEV() function
Frank Ch. Eigler
fche@redhat.com
Fri Jun 20 17:07:00 GMT 2008
William Cohen <wcohen@redhat.com> writes:
> [...]
> It might be useful to have wrappers functions in systemtap to make
> handling major and minor device numbers a bit more portable:
>
> MAJOR(kdev_t dev) extract major device number
> MINOR(kdev_t dev) extract minor device number
> MKDEV(int major, int minor) generate device number
> [...]
Certainly. This sort of abstraction is natural for the tapset, so
does not require much deliberation. Your code is fine. To complete
the work, it'd need a few lines of documentation in stapfuncs.5 and a
test case to compile the functions.
- FChE
More information about the Systemtap
mailing list