Skip to content

Commit 496c9cc

Browse files
stefanhaRHstefanha
authored andcommitted
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 <[email protected]>
1 parent c029ff7 commit 496c9cc

File tree

7 files changed

+14
-0
lines changed

7 files changed

+14
-0
lines changed

libc-test/semver/android.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -666,6 +666,8 @@ HPFS_SUPER_MAGIC
666666
HUGETLBFS_MAGIC
667667
HUPCL
668668
IBSHIFT
669+
BLKIOMIN
670+
BLKIOOPT
669671
BLKSSZGET
670672
BLKPBSZGET
671673
ICANON

libc-test/semver/linux.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,8 @@ B460800
189189
B500000
190190
B576000
191191
B921600
192+
BLKIOMIN
193+
BLKIOOPT
192194
BLKPBSZGET
193195
BLKSSZGET
194196
BOTHER

src/unix/linux_like/android/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1527,6 +1527,8 @@ pub const B3500000: ::speed_t = 0o010016;
15271527
pub const B4000000: ::speed_t = 0o010017;
15281528
pub const IBSHIFT: ::tcflag_t = 16;
15291529

1530+
pub const BLKIOMIN: ::c_int = 0x1278;
1531+
pub const BLKIOOPT: ::c_int = 0x1279;
15301532
pub const BLKSSZGET: ::c_int = 0x1268;
15311533
pub const BLKPBSZGET: ::c_int = 0x127B;
15321534

src/unix/linux_like/linux/arch/generic/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,8 @@ pub const TIOCSERGETMULTI: ::Ioctl = 0x545A;
190190
pub const TIOCSERSETMULTI: ::Ioctl = 0x545B;
191191
pub const TIOCMIWAIT: ::Ioctl = 0x545C;
192192
pub const TIOCGICOUNT: ::Ioctl = 0x545D;
193+
pub const BLKIOMIN: ::Ioctl = 0x1278;
194+
pub const BLKIOOPT: ::Ioctl = 0x1279;
193195
pub const BLKSSZGET: ::Ioctl = 0x1268;
194196
pub const BLKPBSZGET: ::Ioctl = 0x127B;
195197

src/unix/linux_like/linux/arch/mips/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,8 @@ pub const TIOCSLTC: ::Ioctl = 0x7475;
185185
pub const TIOCGETP: ::Ioctl = 0x7408;
186186
pub const TIOCSETP: ::Ioctl = 0x7409;
187187
pub const TIOCSETN: ::Ioctl = 0x740a;
188+
pub const BLKIOMIN: ::Ioctl = 0x20001278;
189+
pub const BLKIOOPT: ::Ioctl = 0x20001279;
188190
pub const BLKSSZGET: ::Ioctl = 0x20001268;
189191
pub const BLKPBSZGET: ::Ioctl = 0x2000127B;
190192

src/unix/linux_like/linux/arch/powerpc/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,8 @@ pub const TIOCSERGETMULTI: ::Ioctl = 0x545A;
170170
pub const TIOCSERSETMULTI: ::Ioctl = 0x545B;
171171
pub const TIOCMIWAIT: ::Ioctl = 0x545C;
172172
pub const TIOCGICOUNT: ::Ioctl = 0x545D;
173+
pub const BLKIOMIN: ::Ioctl = 0x20001278;
174+
pub const BLKIOOPT: ::Ioctl = 0x20001279;
173175
pub const BLKSSZGET: ::Ioctl = 0x20001268;
174176
pub const BLKPBSZGET: ::Ioctl = 0x2000127B;
175177
//pub const FIOQSIZE: ::Ioctl = 0x40086680;

src/unix/linux_like/linux/arch/sparc/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,8 @@ pub const TIOCMIWAIT: ::Ioctl = 0x545C;
171171
pub const TIOCGICOUNT: ::Ioctl = 0x545D;
172172
pub const TIOCSTART: ::Ioctl = 0x2000746e;
173173
pub const TIOCSTOP: ::Ioctl = 0x2000746f;
174+
pub const BLKIOMIN: ::Ioctl = 0x20001278;
175+
pub const BLKIOOPT: ::Ioctl = 0x20001279;
174176
pub const BLKSSZGET: ::Ioctl = 0x20001268;
175177
pub const BLKPBSZGET: ::Ioctl = 0x2000127B;
176178

0 commit comments

Comments
 (0)