This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new ba8abb56431 sys/ioctl: extend the IOCTL defintion that compatible with
linux kernel
ba8abb56431 is described below
commit ba8abb56431eeffc45f6fc5000b07b0aa20b9765
Author: guoshichao <[email protected]>
AuthorDate: Mon Dec 30 15:43:46 2024 +0800
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 <[email protected]>
---
include/sys/ioctl.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/include/sys/ioctl.h b/include/sys/ioctl.h
index 61eaf31f2d1..6483935ac45 100644
--- a/include/sys/ioctl.h
+++ b/include/sys/ioctl.h
@@ -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"