This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Proposing tapset MAJOR(), MINOR(), and MKDEV() function
- From: fche at redhat dot com (Frank Ch. Eigler)
- To: William Cohen <wcohen at redhat dot com>
- Cc: SystemTAP <systemtap at sources dot redhat dot com>
- Date: Thu, 19 Jun 2008 16:13:52 -0400
- Subject: Re: Proposing tapset MAJOR(), MINOR(), and MKDEV() function
- References: <485AAE81.8000100@redhat.com>
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