Skip to content

Conversation

@extinguish
Copy link
Contributor

Summary

Extended the ioctl.h header to add Linux kernel-compatible macro definitions:

  1. Added the _IO(type, nr) macro as a direct mapping to _IOC()
  2. Introduced FS_IOC_GETFLAGS and FS_IOC_SETFLAGS macros aliased to existing FIOC_GETFLAGS and FIOC_SETFLAGS

Impact

Enables easier porting of LTP linux kernel testcases code to NuttX without modifying ioctl command definitions

Testing

  1. Verified compilation with existing codebase to ensure no regression

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]>
@github-actions github-actions bot added the Size: XS The size of the change in this PR is very small label Jan 13, 2026
@jerpelea jerpelea changed the title sys/ioctl: extend the IOCTL defintion that compatible with linux kernel include/sys: extend the IOCTL defintion that compatible with linux kernel Jan 14, 2026
@xiaoxiang781216 xiaoxiang781216 merged commit ba8abb5 into apache:master Jan 14, 2026
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Size: XS The size of the change in this PR is very small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants