20 lines
514 B
C
20 lines
514 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
#ifndef MY_IOCTL_H
|
|
#define MY_IOCTL_H
|
|
#include <linux/ioctl.h>
|
|
|
|
/*
|
|
* Crucial point here, the kernel defines a set of macros for defining IOCTL numbers:
|
|
* _IO - No command
|
|
* _IOR - Read command
|
|
* _IOW - Write command
|
|
* _IORW - RW command
|
|
* _IOC - Basis of the others
|
|
* These macros encode the data type passed to the ioctl.
|
|
*/
|
|
|
|
#define MY_IOCTL_WIPE _IO('k', 0x01)
|
|
#define MY_IOCTL_FILL _IO('k', 0x02) /* Name is a placeholder, fills nothing */
|
|
|
|
#endif // MY-IOCTL_H
|