Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ rust-version = "1.63"

[dependencies]
core = { version = "1.0.0", optional = true, package = "rustc-std-workspace-core" }
compiler_builtins = { version = '0.1.49', optional = true }

[dev-dependencies]
static_assertions = "1.1.0"
Expand Down Expand Up @@ -56,4 +55,4 @@ default = ["std", "general", "errno"]
std = []
no_std = []
elf = []
rustc-dep-of-std = ["core", "compiler_builtins", "no_std"]
rustc-dep-of-std = ["core", "no_std"]
2 changes: 1 addition & 1 deletion gen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ edition = "2021"
publish = false

[dependencies]
bindgen = { version = "0.71.1", default-features = false }
bindgen = { version = "0.72.1", default-features = false }
tempfile = "3.16.0"
2 changes: 1 addition & 1 deletion gen/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ fn main() {
writeln!(cargo_toml, "elf = []").unwrap();
writeln!(
cargo_toml,
"rustc-dep-of-std = [\"core\", \"compiler_builtins\", \"no_std\"]"
"rustc-dep-of-std = [\"core\", \"no_std\"]"
)
.unwrap();

Expand Down
2 changes: 1 addition & 1 deletion src/aarch64/bootparam.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/* automatically generated by rust-bindgen 0.71.1 */
/* automatically generated by rust-bindgen 0.72.1 */


4 changes: 2 additions & 2 deletions src/aarch64/btrfs.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* automatically generated by rust-bindgen 0.71.1 */
/* automatically generated by rust-bindgen 0.72.1 */

pub type __s8 = crate::ctypes::c_schar;
pub type __u8 = crate::ctypes::c_uchar;
Expand Down Expand Up @@ -716,7 +716,7 @@ pub dirid: __u64,
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct btrfs_ioctl_encoded_io_args {
pub iov: *mut iovec,
pub iov: *const iovec,
pub iovcnt: crate::ctypes::c_ulong,
pub offset: __s64,
pub flags: __u64,
Expand Down
2 changes: 1 addition & 1 deletion src/aarch64/elf_uapi.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* automatically generated by rust-bindgen 0.71.1 */
/* automatically generated by rust-bindgen 0.72.1 */

pub type __s8 = crate::ctypes::c_schar;
pub type __u8 = crate::ctypes::c_uchar;
Expand Down
2 changes: 1 addition & 1 deletion src/aarch64/errno.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* automatically generated by rust-bindgen 0.71.1 */
/* automatically generated by rust-bindgen 0.72.1 */

pub const EPERM: u32 = 1;
pub const ENOENT: u32 = 2;
Expand Down
12 changes: 6 additions & 6 deletions src/aarch64/general.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* automatically generated by rust-bindgen 0.71.1 */
/* automatically generated by rust-bindgen 0.72.1 */

pub type __s8 = crate::ctypes::c_schar;
pub type __u8 = crate::ctypes::c_uchar;
Expand Down Expand Up @@ -2937,7 +2937,7 @@ Self::extract_bit(byte, index)
pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool {
debug_assert!(index / 8 < core::mem::size_of::<Storage>());
let byte_index = index / 8;
let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize);
let byte = unsafe { *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize) };
Self::extract_bit(byte, index)
}
#[inline]
Expand All @@ -2961,8 +2961,8 @@ let byte = &mut self.storage.as_mut()[byte_index];
pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) {
debug_assert!(index / 8 < core::mem::size_of::<Storage>());
let byte_index = index / 8;
let byte = (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize);
*byte = Self::change_bit(*byte, index, val);
let byte = unsafe { (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize) };
unsafe { *byte = Self::change_bit(*byte, index, val) };
}
#[inline]
pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 {
Expand All @@ -2985,7 +2985,7 @@ debug_assert!(bit_offset / 8 < core::mem::size_of::<Storage>());
debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::<Storage>());
let mut val = 0;
for i in 0..(bit_width as usize) {
if Self::raw_get_bit(this, i + bit_offset) {
if unsafe { Self::raw_get_bit(this, i + bit_offset) } {
let index = if cfg!(target_endian = "big") { bit_width as usize - 1 - i } else { i };
val |= 1 << index;
}
Expand Down Expand Up @@ -3013,7 +3013,7 @@ for i in 0..(bit_width as usize) {
let mask = 1 << i;
let val_bit_is_set = val & mask == mask;
let index = if cfg!(target_endian = "big") { bit_width as usize - 1 - i } else { i };
Self::raw_set_bit(this, index + bit_offset, val_bit_is_set);
unsafe { Self::raw_set_bit(this, index + bit_offset, val_bit_is_set) };
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/aarch64/if_arp.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* automatically generated by rust-bindgen 0.71.1 */
/* automatically generated by rust-bindgen 0.72.1 */

pub type __s8 = crate::ctypes::c_schar;
pub type __u8 = crate::ctypes::c_uchar;
Expand Down
2 changes: 1 addition & 1 deletion src/aarch64/if_ether.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* automatically generated by rust-bindgen 0.71.1 */
/* automatically generated by rust-bindgen 0.72.1 */

pub type __s8 = crate::ctypes::c_schar;
pub type __u8 = crate::ctypes::c_uchar;
Expand Down
2 changes: 1 addition & 1 deletion src/aarch64/if_packet.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* automatically generated by rust-bindgen 0.71.1 */
/* automatically generated by rust-bindgen 0.72.1 */

pub type __s8 = crate::ctypes::c_schar;
pub type __u8 = crate::ctypes::c_uchar;
Expand Down
2 changes: 1 addition & 1 deletion src/aarch64/image.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* automatically generated by rust-bindgen 0.71.1 */
/* automatically generated by rust-bindgen 0.72.1 */

pub type __s8 = crate::ctypes::c_schar;
pub type __u8 = crate::ctypes::c_uchar;
Expand Down
2 changes: 1 addition & 1 deletion src/aarch64/io_uring.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* automatically generated by rust-bindgen 0.71.1 */
/* automatically generated by rust-bindgen 0.72.1 */

pub type __s8 = crate::ctypes::c_schar;
pub type __u8 = crate::ctypes::c_uchar;
Expand Down
2 changes: 1 addition & 1 deletion src/aarch64/ioctl.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* automatically generated by rust-bindgen 0.71.1 */
/* automatically generated by rust-bindgen 0.72.1 */

pub const FIONREAD: u32 = 21531;
pub const FIONBIO: u32 = 21537;
Expand Down
2 changes: 1 addition & 1 deletion src/aarch64/landlock.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* automatically generated by rust-bindgen 0.71.1 */
/* automatically generated by rust-bindgen 0.72.1 */

pub type __s8 = crate::ctypes::c_schar;
pub type __u8 = crate::ctypes::c_uchar;
Expand Down
2 changes: 1 addition & 1 deletion src/aarch64/loop_device.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* automatically generated by rust-bindgen 0.71.1 */
/* automatically generated by rust-bindgen 0.72.1 */

pub type __kernel_old_uid_t = crate::ctypes::c_ushort;
pub type __kernel_old_gid_t = crate::ctypes::c_ushort;
Expand Down
2 changes: 1 addition & 1 deletion src/aarch64/mempolicy.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* automatically generated by rust-bindgen 0.71.1 */
/* automatically generated by rust-bindgen 0.72.1 */

pub const EPERM: u32 = 1;
pub const ENOENT: u32 = 2;
Expand Down
12 changes: 6 additions & 6 deletions src/aarch64/net.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* automatically generated by rust-bindgen 0.71.1 */
/* automatically generated by rust-bindgen 0.72.1 */

pub type __s8 = crate::ctypes::c_schar;
pub type __u8 = crate::ctypes::c_uchar;
Expand Down Expand Up @@ -2334,7 +2334,7 @@ Self::extract_bit(byte, index)
pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool {
debug_assert!(index / 8 < core::mem::size_of::<Storage>());
let byte_index = index / 8;
let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize);
let byte = unsafe { *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize) };
Self::extract_bit(byte, index)
}
#[inline]
Expand All @@ -2358,8 +2358,8 @@ let byte = &mut self.storage.as_mut()[byte_index];
pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) {
debug_assert!(index / 8 < core::mem::size_of::<Storage>());
let byte_index = index / 8;
let byte = (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize);
*byte = Self::change_bit(*byte, index, val);
let byte = unsafe { (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize) };
unsafe { *byte = Self::change_bit(*byte, index, val) };
}
#[inline]
pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 {
Expand All @@ -2382,7 +2382,7 @@ debug_assert!(bit_offset / 8 < core::mem::size_of::<Storage>());
debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::<Storage>());
let mut val = 0;
for i in 0..(bit_width as usize) {
if Self::raw_get_bit(this, i + bit_offset) {
if unsafe { Self::raw_get_bit(this, i + bit_offset) } {
let index = if cfg!(target_endian = "big") { bit_width as usize - 1 - i } else { i };
val |= 1 << index;
}
Expand Down Expand Up @@ -2410,7 +2410,7 @@ for i in 0..(bit_width as usize) {
let mask = 1 << i;
let val_bit_is_set = val & mask == mask;
let index = if cfg!(target_endian = "big") { bit_width as usize - 1 - i } else { i };
Self::raw_set_bit(this, index + bit_offset, val_bit_is_set);
unsafe { Self::raw_set_bit(this, index + bit_offset, val_bit_is_set) };
}
}
}
Expand Down
7 changes: 4 additions & 3 deletions src/aarch64/netlink.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* automatically generated by rust-bindgen 0.71.1 */
/* automatically generated by rust-bindgen 0.72.1 */

pub type __kernel_sa_family_t = crate::ctypes::c_ushort;
pub type __s8 = crate::ctypes::c_schar;
Expand Down Expand Up @@ -3819,7 +3819,8 @@ NL80211_MBSSID_CONFIG_ATTR_MAX_EMA_PROFILE_PERIODICITY = 2,
NL80211_MBSSID_CONFIG_ATTR_INDEX = 3,
NL80211_MBSSID_CONFIG_ATTR_TX_IFINDEX = 4,
NL80211_MBSSID_CONFIG_ATTR_EMA = 5,
__NL80211_MBSSID_CONFIG_ATTR_LAST = 6,
NL80211_MBSSID_CONFIG_ATTR_TX_LINK_ID = 6,
__NL80211_MBSSID_CONFIG_ATTR_LAST = 7,
}
#[repr(u32)]
#[non_exhaustive]
Expand Down Expand Up @@ -5435,7 +5436,7 @@ impl nl80211_sar_specs_attrs {
pub const NL80211_SAR_ATTR_SPECS_MAX: nl80211_sar_specs_attrs = nl80211_sar_specs_attrs::NL80211_SAR_ATTR_SPECS_END_FREQ;
}
impl nl80211_mbssid_config_attributes {
pub const NL80211_MBSSID_CONFIG_ATTR_MAX: nl80211_mbssid_config_attributes = nl80211_mbssid_config_attributes::NL80211_MBSSID_CONFIG_ATTR_EMA;
pub const NL80211_MBSSID_CONFIG_ATTR_MAX: nl80211_mbssid_config_attributes = nl80211_mbssid_config_attributes::NL80211_MBSSID_CONFIG_ATTR_TX_LINK_ID;
}
impl nl80211_wiphy_radio_attrs {
pub const NL80211_WIPHY_RADIO_ATTR_MAX: nl80211_wiphy_radio_attrs = nl80211_wiphy_radio_attrs::NL80211_WIPHY_RADIO_ATTR_ANTENNA_MASK;
Expand Down
2 changes: 1 addition & 1 deletion src/aarch64/prctl.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* automatically generated by rust-bindgen 0.71.1 */
/* automatically generated by rust-bindgen 0.72.1 */

pub type __s8 = crate::ctypes::c_schar;
pub type __u8 = crate::ctypes::c_uchar;
Expand Down
2 changes: 1 addition & 1 deletion src/aarch64/ptrace.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* automatically generated by rust-bindgen 0.71.1 */
/* automatically generated by rust-bindgen 0.72.1 */

pub type __s8 = crate::ctypes::c_schar;
pub type __u8 = crate::ctypes::c_uchar;
Expand Down
2 changes: 1 addition & 1 deletion src/aarch64/system.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* automatically generated by rust-bindgen 0.71.1 */
/* automatically generated by rust-bindgen 0.72.1 */

pub type __s8 = crate::ctypes::c_schar;
pub type __u8 = crate::ctypes::c_uchar;
Expand Down
2 changes: 1 addition & 1 deletion src/aarch64/xdp.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* automatically generated by rust-bindgen 0.71.1 */
/* automatically generated by rust-bindgen 0.72.1 */

pub type __s8 = crate::ctypes::c_schar;
pub type __u8 = crate::ctypes::c_uchar;
Expand Down
2 changes: 1 addition & 1 deletion src/arm/bootparam.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/* automatically generated by rust-bindgen 0.71.1 */
/* automatically generated by rust-bindgen 0.72.1 */


4 changes: 2 additions & 2 deletions src/arm/btrfs.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* automatically generated by rust-bindgen 0.71.1 */
/* automatically generated by rust-bindgen 0.72.1 */

pub type __s8 = crate::ctypes::c_schar;
pub type __u8 = crate::ctypes::c_uchar;
Expand Down Expand Up @@ -714,7 +714,7 @@ pub dirid: __u64,
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct btrfs_ioctl_encoded_io_args {
pub iov: *mut iovec,
pub iov: *const iovec,
pub iovcnt: crate::ctypes::c_ulong,
pub offset: __s64,
pub flags: __u64,
Expand Down
2 changes: 1 addition & 1 deletion src/arm/elf_uapi.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* automatically generated by rust-bindgen 0.71.1 */
/* automatically generated by rust-bindgen 0.72.1 */

pub type __s8 = crate::ctypes::c_schar;
pub type __u8 = crate::ctypes::c_uchar;
Expand Down
2 changes: 1 addition & 1 deletion src/arm/errno.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* automatically generated by rust-bindgen 0.71.1 */
/* automatically generated by rust-bindgen 0.72.1 */

pub const EPERM: u32 = 1;
pub const ENOENT: u32 = 2;
Expand Down
12 changes: 6 additions & 6 deletions src/arm/general.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* automatically generated by rust-bindgen 0.71.1 */
/* automatically generated by rust-bindgen 0.72.1 */

pub type __s8 = crate::ctypes::c_schar;
pub type __u8 = crate::ctypes::c_uchar;
Expand Down Expand Up @@ -3078,7 +3078,7 @@ Self::extract_bit(byte, index)
pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool {
debug_assert!(index / 8 < core::mem::size_of::<Storage>());
let byte_index = index / 8;
let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize);
let byte = unsafe { *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize) };
Self::extract_bit(byte, index)
}
#[inline]
Expand All @@ -3102,8 +3102,8 @@ let byte = &mut self.storage.as_mut()[byte_index];
pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) {
debug_assert!(index / 8 < core::mem::size_of::<Storage>());
let byte_index = index / 8;
let byte = (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize);
*byte = Self::change_bit(*byte, index, val);
let byte = unsafe { (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize) };
unsafe { *byte = Self::change_bit(*byte, index, val) };
}
#[inline]
pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 {
Expand All @@ -3126,7 +3126,7 @@ debug_assert!(bit_offset / 8 < core::mem::size_of::<Storage>());
debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::<Storage>());
let mut val = 0;
for i in 0..(bit_width as usize) {
if Self::raw_get_bit(this, i + bit_offset) {
if unsafe { Self::raw_get_bit(this, i + bit_offset) } {
let index = if cfg!(target_endian = "big") { bit_width as usize - 1 - i } else { i };
val |= 1 << index;
}
Expand Down Expand Up @@ -3154,7 +3154,7 @@ for i in 0..(bit_width as usize) {
let mask = 1 << i;
let val_bit_is_set = val & mask == mask;
let index = if cfg!(target_endian = "big") { bit_width as usize - 1 - i } else { i };
Self::raw_set_bit(this, index + bit_offset, val_bit_is_set);
unsafe { Self::raw_set_bit(this, index + bit_offset, val_bit_is_set) };
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/arm/if_arp.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* automatically generated by rust-bindgen 0.71.1 */
/* automatically generated by rust-bindgen 0.72.1 */

pub type __s8 = crate::ctypes::c_schar;
pub type __u8 = crate::ctypes::c_uchar;
Expand Down
2 changes: 1 addition & 1 deletion src/arm/if_ether.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* automatically generated by rust-bindgen 0.71.1 */
/* automatically generated by rust-bindgen 0.72.1 */

pub type __s8 = crate::ctypes::c_schar;
pub type __u8 = crate::ctypes::c_uchar;
Expand Down
2 changes: 1 addition & 1 deletion src/arm/if_packet.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* automatically generated by rust-bindgen 0.71.1 */
/* automatically generated by rust-bindgen 0.72.1 */

pub type __s8 = crate::ctypes::c_schar;
pub type __u8 = crate::ctypes::c_uchar;
Expand Down
2 changes: 1 addition & 1 deletion src/arm/image.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/* automatically generated by rust-bindgen 0.71.1 */
/* automatically generated by rust-bindgen 0.72.1 */


2 changes: 1 addition & 1 deletion src/arm/io_uring.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* automatically generated by rust-bindgen 0.71.1 */
/* automatically generated by rust-bindgen 0.72.1 */

pub type __s8 = crate::ctypes::c_schar;
pub type __u8 = crate::ctypes::c_uchar;
Expand Down
2 changes: 1 addition & 1 deletion src/arm/ioctl.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* automatically generated by rust-bindgen 0.71.1 */
/* automatically generated by rust-bindgen 0.72.1 */

pub const FIONREAD: u32 = 21531;
pub const FIONBIO: u32 = 21537;
Expand Down
2 changes: 1 addition & 1 deletion src/arm/landlock.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* automatically generated by rust-bindgen 0.71.1 */
/* automatically generated by rust-bindgen 0.72.1 */

pub type __s8 = crate::ctypes::c_schar;
pub type __u8 = crate::ctypes::c_uchar;
Expand Down
2 changes: 1 addition & 1 deletion src/arm/loop_device.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* automatically generated by rust-bindgen 0.71.1 */
/* automatically generated by rust-bindgen 0.72.1 */

pub type __kernel_mode_t = crate::ctypes::c_ushort;
pub type __kernel_ipc_pid_t = crate::ctypes::c_ushort;
Expand Down
2 changes: 1 addition & 1 deletion src/arm/mempolicy.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* automatically generated by rust-bindgen 0.71.1 */
/* automatically generated by rust-bindgen 0.72.1 */

pub const EPERM: u32 = 1;
pub const ENOENT: u32 = 2;
Expand Down
Loading