feature: add devpts fd wrapper (#21)

This feature is intended to resolve devpts problem.
This commit is contained in:
5ec1cff
2025-11-06 23:29:58 +08:00
committed by ShirkNeko
parent 3662c92854
commit c876d60e53
11 changed files with 460 additions and 18 deletions

View File

@@ -77,6 +77,11 @@ struct ksu_set_feature_cmd {
__u64 value; // Input: feature value/state to set
};
struct ksu_get_wrapper_fd_cmd {
__u32 fd;
__u32 flags; // CLOEXEC
};
// Other command structures
struct ksu_get_full_version_cmd {
char version_full[KSU_FULL_VERSION_STRING]; // Output: full version string
@@ -128,6 +133,7 @@ struct ksu_manual_su_cmd {
#define KSU_IOCTL_SET_APP_PROFILE _IOC(_IOC_WRITE, 'K', 12, 0)
#define KSU_IOCTL_GET_FEATURE _IOC(_IOC_READ|_IOC_WRITE, 'K', 13, 0)
#define KSU_IOCTL_SET_FEATURE _IOC(_IOC_WRITE, 'K', 14, 0)
#define KSU_IOCTL_GET_WRAPPER_FD _IOC(_IOC_NONE, 'K', 10000, 0)
// Other IOCTL command definitions
#define KSU_IOCTL_GET_FULL_VERSION _IOC(_IOC_READ, 'K', 100, 0)
#define KSU_IOCTL_HOOK_TYPE _IOC(_IOC_READ, 'K', 101, 0)