Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: assemble ioctl number from raw parameters #15

Open
gschwaer opened this issue Jun 29, 2022 · 0 comments
Open

Feature request: assemble ioctl number from raw parameters #15

gschwaer opened this issue Jun 29, 2022 · 0 comments

Comments

@gschwaer
Copy link

Hi,

I have a small feature request: It would be helpful if one could specify the ioctl in it's raw (unencoded) form, i.e., like ./ioctl /dev/mydev dir=2,type=1,nr=0,size=4. This tool then just has to assemble it using the macro _IOC from ioctl.h:

#define _IOC(dir,type,nr,size) \
	(((dir)  << _IOC_DIRSHIFT) | \
	 ((type) << _IOC_TYPESHIFT) | \
	 ((nr)   << _IOC_NRSHIFT) | \
	 ((size) << _IOC_SIZESHIFT))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant