mirror of
https://github.com/apache/nuttx.git
synced 2026-05-16 22:21:04 +08:00
sys/ioctl: extend the IOCTL defintion that compatible with linux kernel
Add the generic _IO() macro and aliases for FS_IOC_GETFLAGS and FS_IOC_SETFLAGS, aligning the ioctl.h definitions with the Linux kernel API to improve source compatibility when porting LTP linux kernel testcase code to NuttX Signed-off-by: guoshichao <guoshichao@xiaomi.com>
This commit is contained in:
@@ -68,6 +68,13 @@
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* The compatibility IOCTL definitions */
|
||||
|
||||
#define _IO(type,nr) _IOC((type),(nr))
|
||||
|
||||
#define FS_IOC_GETFLAGS FIOC_GETFLAGS
|
||||
#define FS_IOC_SETFLAGS FIOC_SETFLAGS
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
#define EXTERN extern "C"
|
||||
|
||||
Reference in New Issue
Block a user