This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Proposing tapset MAJOR(), MINOR(), and MKDEV() function


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]