aboutsummaryrefslogtreecommitdiff
path: root/src/unix/linux_like/linux/arch/generic/mod.rs
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2024-04-30 21:48:50 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2024-04-30 21:48:50 +0000
commit47ddaf193fd5c977f460daf1d7eaaed0421c5e0a (patch)
tree189551290ab445f08d0472b8e38cf5243b9dfb65 /src/unix/linux_like/linux/arch/generic/mod.rs
parenta83736719ee374a901f171280814f6eae312bfcf (diff)
parent5450d5b9c7ed69b01af98aebad2308ee91749307 (diff)
downloadlibc-47ddaf193fd5c977f460daf1d7eaaed0421c5e0a.tar.gz
Snap for 11784721 from 5450d5b9c7ed69b01af98aebad2308ee91749307 to build-tools-release
Change-Id: I96fc901cc8a273052474f2dc77510d5dd6918cf6
Diffstat (limited to 'src/unix/linux_like/linux/arch/generic/mod.rs')
-rw-r--r--src/unix/linux_like/linux/arch/generic/mod.rs32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/unix/linux_like/linux/arch/generic/mod.rs b/src/unix/linux_like/linux/arch/generic/mod.rs
index 10e1fcca..83f97fbd 100644
--- a/src/unix/linux_like/linux/arch/generic/mod.rs
+++ b/src/unix/linux_like/linux/arch/generic/mod.rs
@@ -212,6 +212,38 @@ pub const BLKSSZGET: ::Ioctl = 0x1268;
pub const BLKPBSZGET: ::Ioctl = 0x127B;
cfg_if! {
+ // Those type are constructed using the _IOC macro
+ // DD-SS_SSSS_SSSS_SSSS-TTTT_TTTT-NNNN_NNNN
+ // where D stands for direction (either None (00), Read (01) or Write (11))
+ // where S stands for size (int, long, struct...)
+ // where T stands for type ('f','v','X'...)
+ // where N stands for NR (NumbeR)
+ if #[cfg(any(target_arch = "x86", target_arch = "arm"))] {
+ pub const FS_IOC_GETFLAGS: ::Ioctl = 0x80046601;
+ pub const FS_IOC_SETFLAGS: ::Ioctl = 0x40046602;
+ pub const FS_IOC_GETVERSION: ::Ioctl = 0x80047601;
+ pub const FS_IOC_SETVERSION: ::Ioctl = 0x40047602;
+ pub const FS_IOC32_GETFLAGS: ::Ioctl = 0x80046601;
+ pub const FS_IOC32_SETFLAGS: ::Ioctl = 0x40046602;
+ pub const FS_IOC32_GETVERSION: ::Ioctl = 0x80047601;
+ pub const FS_IOC32_SETVERSION: ::Ioctl = 0x40047602;
+ } else if #[cfg(any(target_arch = "x86_64",
+ target_arch = "riscv64",
+ target_arch = "aarch64",
+ target_arch = "s390x",
+ target_arch = "loongarch64"))] {
+ pub const FS_IOC_GETFLAGS: ::Ioctl = 0x80086601;
+ pub const FS_IOC_SETFLAGS: ::Ioctl = 0x40086602;
+ pub const FS_IOC_GETVERSION: ::Ioctl = 0x80087601;
+ pub const FS_IOC_SETVERSION: ::Ioctl = 0x40087602;
+ pub const FS_IOC32_GETFLAGS: ::Ioctl = 0x80046601;
+ pub const FS_IOC32_SETFLAGS: ::Ioctl = 0x40046602;
+ pub const FS_IOC32_GETVERSION: ::Ioctl = 0x80047601;
+ pub const FS_IOC32_SETVERSION: ::Ioctl = 0x40047602;
+ }
+}
+
+cfg_if! {
if #[cfg(any(target_arch = "arm",
target_arch = "s390x"))] {
pub const FIOQSIZE: ::Ioctl = 0x545E;