Skip to content

Commit c2f5c64

Browse files
authored
Merge pull request rust-lang#4325 from Mr2Brainless/export_ioctl_req_generators
linux: Export ioctl request generator macros
2 parents e99dc5f + cf6113d commit c2f5c64

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

libc-test/semver/linux.txt

+4
Original file line numberDiff line numberDiff line change
@@ -3552,9 +3552,13 @@ _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS
35523552
_CS_POSIX_V7_LPBIG_OFFBIG_LIBS
35533553
_CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS
35543554
_CS_POSIX_V7_WIDTH_RESTRICTED_ENVS
3555+
_IO
35553556
_IOFBF
35563557
_IOLBF
35573558
_IONBF
3559+
_IOR
3560+
_IOW
3561+
_IOWR
35583562
_PC_2_SYMLINKS
35593563
_PC_ALLOC_SIZE_MIN
35603564
_PC_ASYNC_IO

src/unix/linux_like/linux/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -5899,22 +5899,22 @@ const fn _IOC(dir: u32, ty: u32, nr: u32, size: usize) -> u32 {
58995899
}
59005900

59015901
/// Build an ioctl number for an argumentless ioctl.
5902-
pub(crate) const fn _IO(ty: u32, nr: u32) -> u32 {
5902+
pub const fn _IO(ty: u32, nr: u32) -> u32 {
59035903
_IOC(_IOC_NONE, ty, nr, 0)
59045904
}
59055905

59065906
/// Build an ioctl number for an read-only ioctl.
5907-
pub(crate) const fn _IOR<T>(ty: u32, nr: u32) -> u32 {
5907+
pub const fn _IOR<T>(ty: u32, nr: u32) -> u32 {
59085908
_IOC(_IOC_READ, ty, nr, size_of::<T>())
59095909
}
59105910

59115911
/// Build an ioctl number for an write-only ioctl.
5912-
pub(crate) const fn _IOW<T>(ty: u32, nr: u32) -> u32 {
5912+
pub const fn _IOW<T>(ty: u32, nr: u32) -> u32 {
59135913
_IOC(_IOC_WRITE, ty, nr, size_of::<T>())
59145914
}
59155915

59165916
/// Build an ioctl number for a read-write ioctl.
5917-
pub(crate) const fn _IOWR<T>(ty: u32, nr: u32) -> u32 {
5917+
pub const fn _IOWR<T>(ty: u32, nr: u32) -> u32 {
59185918
_IOC(_IOC_READ | _IOC_WRITE, ty, nr, size_of::<T>())
59195919
}
59205920

0 commit comments

Comments
 (0)