Magic Numbers for IOCTL Commands [closed]
up vote
0
down vote
favorite
To add ioctl functionality to your device driver, you have to define unique ioctl commands. To accomplish this, some linux macros are used. These macros are located in header file include/asm/ioctl.h
.
These macros take two and sometimes three arguments, but the first argument is fixed, which is a magic number. Magic numbers are listed in the table located in the link below. https://github.com/torvalds/linux/blob/master/Documentation/ioctl/ioctl-number.txt
What I am wondering is how we choose a magic number. When you look at the table, you see the magic numbers along with some header files and the message called conflict
.
Which one of them is available ?
Does the message conflict
mean that magic number is busy; you cannot use it ?
drivers kernel devices
closed as off-topic by muru, waltinator, Eric Carvalho, Thomas, Soren A Dec 5 at 13:23
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – muru, waltinator, Eric Carvalho, Thomas, Soren A
If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
up vote
0
down vote
favorite
To add ioctl functionality to your device driver, you have to define unique ioctl commands. To accomplish this, some linux macros are used. These macros are located in header file include/asm/ioctl.h
.
These macros take two and sometimes three arguments, but the first argument is fixed, which is a magic number. Magic numbers are listed in the table located in the link below. https://github.com/torvalds/linux/blob/master/Documentation/ioctl/ioctl-number.txt
What I am wondering is how we choose a magic number. When you look at the table, you see the magic numbers along with some header files and the message called conflict
.
Which one of them is available ?
Does the message conflict
mean that magic number is busy; you cannot use it ?
drivers kernel devices
closed as off-topic by muru, waltinator, Eric Carvalho, Thomas, Soren A Dec 5 at 13:23
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – muru, waltinator, Eric Carvalho, Thomas, Soren A
If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
To add ioctl functionality to your device driver, you have to define unique ioctl commands. To accomplish this, some linux macros are used. These macros are located in header file include/asm/ioctl.h
.
These macros take two and sometimes three arguments, but the first argument is fixed, which is a magic number. Magic numbers are listed in the table located in the link below. https://github.com/torvalds/linux/blob/master/Documentation/ioctl/ioctl-number.txt
What I am wondering is how we choose a magic number. When you look at the table, you see the magic numbers along with some header files and the message called conflict
.
Which one of them is available ?
Does the message conflict
mean that magic number is busy; you cannot use it ?
drivers kernel devices
To add ioctl functionality to your device driver, you have to define unique ioctl commands. To accomplish this, some linux macros are used. These macros are located in header file include/asm/ioctl.h
.
These macros take two and sometimes three arguments, but the first argument is fixed, which is a magic number. Magic numbers are listed in the table located in the link below. https://github.com/torvalds/linux/blob/master/Documentation/ioctl/ioctl-number.txt
What I am wondering is how we choose a magic number. When you look at the table, you see the magic numbers along with some header files and the message called conflict
.
Which one of them is available ?
Does the message conflict
mean that magic number is busy; you cannot use it ?
drivers kernel devices
drivers kernel devices
edited Nov 28 at 11:42
asked Nov 28 at 11:33
Goktug
1136
1136
closed as off-topic by muru, waltinator, Eric Carvalho, Thomas, Soren A Dec 5 at 13:23
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – muru, waltinator, Eric Carvalho, Thomas, Soren A
If this question can be reworded to fit the rules in the help center, please edit the question.
closed as off-topic by muru, waltinator, Eric Carvalho, Thomas, Soren A Dec 5 at 13:23
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – muru, waltinator, Eric Carvalho, Thomas, Soren A
If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes