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:
guoshichao
2024-12-30 15:43:46 +08:00
committed by Xiang Xiao
parent 1327ce5214
commit ba8abb5643
+7
View File
@@ -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"