From 496c9ccf4e4f2330fbaa94774d569f41dfbc189e Mon Sep 17 00:00:00 2001 From: Stefan Hajnoczi Date: Tue, 1 Mar 2022 17:11:27 +0000 Subject: Add Linux BLKIOMIN and BLKIOOPT ioctl constants These ioctl constants are used to fetch the minimum and optimal I/O sizes for block devices. Signed-off-by: Stefan Hajnoczi --- libc-test/semver/android.txt | 2 ++ libc-test/semver/linux.txt | 2 ++ src/unix/linux_like/android/mod.rs | 2 ++ src/unix/linux_like/linux/arch/generic/mod.rs | 2 ++ src/unix/linux_like/linux/arch/mips/mod.rs | 2 ++ src/unix/linux_like/linux/arch/powerpc/mod.rs | 2 ++ src/unix/linux_like/linux/arch/sparc/mod.rs | 2 ++ 7 files changed, 14 insertions(+) diff --git a/libc-test/semver/android.txt b/libc-test/semver/android.txt index 55bf4d2b76..a68ff86d7e 100644 --- a/libc-test/semver/android.txt +++ b/libc-test/semver/android.txt @@ -666,6 +666,8 @@ HPFS_SUPER_MAGIC HUGETLBFS_MAGIC HUPCL IBSHIFT +BLKIOMIN +BLKIOOPT BLKSSZGET BLKPBSZGET ICANON diff --git a/libc-test/semver/linux.txt b/libc-test/semver/linux.txt index b30f90083e..932b84e2a5 100644 --- a/libc-test/semver/linux.txt +++ b/libc-test/semver/linux.txt @@ -189,6 +189,8 @@ B460800 B500000 B576000 B921600 +BLKIOMIN +BLKIOOPT BLKPBSZGET BLKSSZGET BOTHER diff --git a/src/unix/linux_like/android/mod.rs b/src/unix/linux_like/android/mod.rs index fe3cdbb8c4..13d85b3f44 100644 --- a/src/unix/linux_like/android/mod.rs +++ b/src/unix/linux_like/android/mod.rs @@ -1527,6 +1527,8 @@ pub const B3500000: ::speed_t = 0o010016; pub const B4000000: ::speed_t = 0o010017; pub const IBSHIFT: ::tcflag_t = 16; +pub const BLKIOMIN: ::c_int = 0x1278; +pub const BLKIOOPT: ::c_int = 0x1279; pub const BLKSSZGET: ::c_int = 0x1268; pub const BLKPBSZGET: ::c_int = 0x127B; diff --git a/src/unix/linux_like/linux/arch/generic/mod.rs b/src/unix/linux_like/linux/arch/generic/mod.rs index 2196231565..3205799553 100644 --- a/src/unix/linux_like/linux/arch/generic/mod.rs +++ b/src/unix/linux_like/linux/arch/generic/mod.rs @@ -190,6 +190,8 @@ pub const TIOCSERGETMULTI: ::Ioctl = 0x545A; pub const TIOCSERSETMULTI: ::Ioctl = 0x545B; pub const TIOCMIWAIT: ::Ioctl = 0x545C; pub const TIOCGICOUNT: ::Ioctl = 0x545D; +pub const BLKIOMIN: ::Ioctl = 0x1278; +pub const BLKIOOPT: ::Ioctl = 0x1279; pub const BLKSSZGET: ::Ioctl = 0x1268; pub const BLKPBSZGET: ::Ioctl = 0x127B; diff --git a/src/unix/linux_like/linux/arch/mips/mod.rs b/src/unix/linux_like/linux/arch/mips/mod.rs index 393fa0594f..077417de52 100644 --- a/src/unix/linux_like/linux/arch/mips/mod.rs +++ b/src/unix/linux_like/linux/arch/mips/mod.rs @@ -185,6 +185,8 @@ pub const TIOCSLTC: ::Ioctl = 0x7475; pub const TIOCGETP: ::Ioctl = 0x7408; pub const TIOCSETP: ::Ioctl = 0x7409; pub const TIOCSETN: ::Ioctl = 0x740a; +pub const BLKIOMIN: ::Ioctl = 0x20001278; +pub const BLKIOOPT: ::Ioctl = 0x20001279; pub const BLKSSZGET: ::Ioctl = 0x20001268; pub const BLKPBSZGET: ::Ioctl = 0x2000127B; diff --git a/src/unix/linux_like/linux/arch/powerpc/mod.rs b/src/unix/linux_like/linux/arch/powerpc/mod.rs index 8e4c449963..637b7a1e34 100644 --- a/src/unix/linux_like/linux/arch/powerpc/mod.rs +++ b/src/unix/linux_like/linux/arch/powerpc/mod.rs @@ -170,6 +170,8 @@ pub const TIOCSERGETMULTI: ::Ioctl = 0x545A; pub const TIOCSERSETMULTI: ::Ioctl = 0x545B; pub const TIOCMIWAIT: ::Ioctl = 0x545C; pub const TIOCGICOUNT: ::Ioctl = 0x545D; +pub const BLKIOMIN: ::Ioctl = 0x20001278; +pub const BLKIOOPT: ::Ioctl = 0x20001279; pub const BLKSSZGET: ::Ioctl = 0x20001268; pub const BLKPBSZGET: ::Ioctl = 0x2000127B; //pub const FIOQSIZE: ::Ioctl = 0x40086680; diff --git a/src/unix/linux_like/linux/arch/sparc/mod.rs b/src/unix/linux_like/linux/arch/sparc/mod.rs index efd857c7c4..da3e388e3d 100644 --- a/src/unix/linux_like/linux/arch/sparc/mod.rs +++ b/src/unix/linux_like/linux/arch/sparc/mod.rs @@ -171,6 +171,8 @@ pub const TIOCMIWAIT: ::Ioctl = 0x545C; pub const TIOCGICOUNT: ::Ioctl = 0x545D; pub const TIOCSTART: ::Ioctl = 0x2000746e; pub const TIOCSTOP: ::Ioctl = 0x2000746f; +pub const BLKIOMIN: ::Ioctl = 0x20001278; +pub const BLKIOOPT: ::Ioctl = 0x20001279; pub const BLKSSZGET: ::Ioctl = 0x20001268; pub const BLKPBSZGET: ::Ioctl = 0x2000127B; -- cgit v1.2.1