diff --git a/libc-test/test/check_style.rs b/libc-test/test/check_style.rs index ee5e134891104..34266d10e23bb 100644 --- a/libc-test/test/check_style.rs +++ b/libc-test/test/check_style.rs @@ -16,21 +16,32 @@ use std::path::Path; use style::{Result, StyleChecker}; +/// Relative to `src/`. +const SKIP_PREFIXES: &[&str] = &[ + // Don't run the style checker on the reorganized portion of the crate while we figure + // out what style we want. + "reorg/", +]; + #[test] fn check_style() { - let root_dir = Path::new(env!("CARGO_MANIFEST_DIR")).join("../src"); - walk(&root_dir).unwrap(); + let src_root = Path::new(env!("CARGO_MANIFEST_DIR")).join("../src"); + walk(&src_root).unwrap(); eprintln!("good style!"); } -fn walk(root_dir: &Path) -> Result<()> { +fn walk(src_root: &Path) -> Result<()> { let mut style_checker = StyleChecker::new(); for entry in glob::glob(&format!( "{}/**/*.rs", - root_dir.to_str().expect("dir should be valid UTF-8") + src_root.to_str().expect("dir should be valid UTF-8") ))? { let entry = entry?; + let relpath = entry.strip_prefix(src_root).expect("known path"); + if SKIP_PREFIXES.iter().any(|pfx| relpath.starts_with(pfx)) { + continue; + } let name = entry .file_name() diff --git a/src/lib.rs b/src/lib.rs index 255f4550056ce..1a9a97291890d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -29,6 +29,7 @@ #[macro_use] mod macros; +mod reorg; cfg_if! { if #[cfg(feature = "rustc-dep-of-std")] { @@ -38,6 +39,9 @@ cfg_if! { pub use core::ffi::c_void; +#[allow(unused_imports)] // needed while the module is empty on some platforms +pub use reorg::*; + cfg_if! { if #[cfg(windows)] { mod primitives; diff --git a/src/macros.rs b/src/macros.rs index 12d3ab4b595ca..bbc43268f6bb9 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -219,27 +219,17 @@ macro_rules! e { /// /// See for more. macro_rules! c_enum { - ( - $(#[repr($repr:ty)])? - $ty_name:ident { - $($variant:ident $(= $value:literal)?,)+ - } - ) => { - pub type $ty_name = c_enum!(@ty $($repr)?); - c_enum!(@one; $ty_name; 0; $($variant $(= $value)?,)+); - }; - // Matcher for a single variant (@one; $_ty_name:ident; $_idx:expr;) => {}; ( @one; $ty_name:ident; $default_val:expr; - $variant:ident $(= $value:literal)?, + $variant:ident $(= $value:expr)*, $($tail:tt)* ) => { pub const $variant: $ty_name = { #[allow(unused_variables)] let r = $default_val; - $(let r = $value;)? + $(let r = $value;)* r }; @@ -250,7 +240,17 @@ macro_rules! c_enum { // Use a specific type if provided, otherwise default to `c_uint` (@ty $repr:ty) => { $repr }; - (@ty) => { $crate::c_uint }; + (@ty) => { crate::c_uint }; + + ( + $(#[repr($repr:ty)])* + enum $ty_name:ident { + $($variant:ident $(= $value:expr)*,)+ + } + ) => { + pub type $ty_name = c_enum!(@ty $($repr)*); + c_enum!(@one; $ty_name; 0; $($variant $(= $value)*,)+); + }; } // This is a pretty horrible hack to allow us to conditionally mark some functions as 'const', @@ -375,7 +375,7 @@ mod tests { fn c_enumbasic() { // By default, variants get sequential values. c_enum! { - e { + enum e { VAR0, VAR1, VAR2, @@ -392,7 +392,7 @@ mod tests { // By default, variants get sequential values. c_enum! { #[repr(u16)] - e { + enum e { VAR0, } } @@ -404,7 +404,7 @@ mod tests { fn c_enumset_value() { // Setting an explicit value resets the count. c_enum! { - e { + enum e { VAR2 = 2, VAR3, VAR4, @@ -421,7 +421,7 @@ mod tests { // C enums always take one more than the previous value, unless set to a specific // value. Duplicates are allowed. c_enum! { - e { + enum e { VAR0, VAR2_0 = 2, VAR3_0, diff --git a/src/reorg/linux_uapi/linux/can.rs b/src/reorg/linux_uapi/linux/can.rs new file mode 100644 index 0000000000000..bf455d5a1d253 --- /dev/null +++ b/src/reorg/linux_uapi/linux/can.rs @@ -0,0 +1,145 @@ +//! Header: `uapi/linux/can.h` + +#[path = "can/j1939.rs"] +pub(crate) mod j1939; +#[path = "can/raw.rs"] +pub(crate) mod raw; + +pub use j1939::*; +pub use raw::*; + +use crate::prelude::*; + +pub const CAN_EFF_FLAG: canid_t = 0x80000000; +pub const CAN_RTR_FLAG: canid_t = 0x40000000; +pub const CAN_ERR_FLAG: canid_t = 0x20000000; + +pub const CAN_SFF_MASK: canid_t = 0x000007FF; +pub const CAN_EFF_MASK: canid_t = 0x1FFFFFFF; +pub const CAN_ERR_MASK: canid_t = 0x1FFFFFFF; +pub const CANXL_PRIO_MASK: crate::canid_t = CAN_SFF_MASK; + +pub type canid_t = u32; + +pub const CAN_SFF_ID_BITS: c_int = 11; +pub const CAN_EFF_ID_BITS: c_int = 29; +pub const CANXL_PRIO_BITS: c_int = CAN_SFF_ID_BITS; + +pub type can_err_mask_t = u32; + +pub const CAN_MAX_DLC: c_int = 8; +pub const CAN_MAX_DLEN: usize = 8; + +pub const CANFD_MAX_DLC: c_int = 15; +pub const CANFD_MAX_DLEN: usize = 64; + +pub const CANXL_MIN_DLC: c_int = 0; +pub const CANXL_MAX_DLC: c_int = 2047; +pub const CANXL_MAX_DLC_MASK: c_int = 0x07FF; +pub const CANXL_MIN_DLEN: usize = 1; +pub const CANXL_MAX_DLEN: usize = 2048; + +s! { + #[repr(align(8))] + #[allow(missing_debug_implementations)] + pub struct can_frame { + pub can_id: canid_t, + // FIXME(1.0): this field was renamed to `len` in Linux 5.11 + pub can_dlc: u8, + __pad: u8, + __res0: u8, + pub len8_dlc: u8, + pub data: [u8; CAN_MAX_DLEN], + } +} + +pub const CANFD_BRS: c_int = 0x01; +pub const CANFD_ESI: c_int = 0x02; +pub const CANFD_FDF: c_int = 0x04; + +s! { + #[repr(align(8))] + #[allow(missing_debug_implementations)] + pub struct canfd_frame { + pub can_id: canid_t, + pub len: u8, + pub flags: u8, + __res0: u8, + __res1: u8, + pub data: [u8; CANFD_MAX_DLEN], + } +} + +pub const CANXL_XLF: c_int = 0x80; +pub const CANXL_SEC: c_int = 0x01; + +s! { + #[repr(align(8))] + #[allow(missing_debug_implementations)] + pub struct canxl_frame { + pub prio: canid_t, + pub flags: u8, + pub sdt: u8, + pub len: u16, + pub af: u32, + pub data: [u8; CANXL_MAX_DLEN], + } +} + +pub const CAN_MTU: usize = size_of::(); +pub const CANFD_MTU: usize = size_of::(); +pub const CANXL_MTU: usize = size_of::(); +// FIXME(offset_of): use `core::mem::offset_of!` once that is available +// https://github.com/rust-lang/rfcs/pull/3308 +// pub const CANXL_HDR_SIZE: usize = core::mem::offset_of!(canxl_frame, data); +pub const CANXL_HDR_SIZE: usize = 12; +pub const CANXL_MIN_MTU: usize = CANXL_HDR_SIZE + 64; +pub const CANXL_MAX_MTU: usize = CANXL_MTU; + +pub const CAN_RAW: c_int = 1; +pub const CAN_BCM: c_int = 2; +pub const CAN_TP16: c_int = 3; +pub const CAN_TP20: c_int = 4; +pub const CAN_MCNET: c_int = 5; +pub const CAN_ISOTP: c_int = 6; +pub const CAN_J1939: c_int = 7; +pub const CAN_NPROTO: c_int = 8; + +pub const SOL_CAN_BASE: c_int = 100; + +s_no_extra_traits! { + // #[allow(missing_debug_implementations)] + pub struct sockaddr_can { + pub can_family: crate::sa_family_t, + pub can_ifindex: c_int, + pub can_addr: __c_anonymous_sockaddr_can_can_addr, + } + + // #[allow(missing_debug_implementations)] + pub union __c_anonymous_sockaddr_can_can_addr { + pub tp: __c_anonymous_sockaddr_can_tp, + pub j1939: __c_anonymous_sockaddr_can_j1939, + } + + #[derive(Debug)] + pub struct __c_anonymous_sockaddr_can_tp { + pub rx_id: canid_t, + pub tx_id: canid_t, + } + + #[derive(Debug)] + pub struct __c_anonymous_sockaddr_can_j1939 { + pub name: u64, + pub pgn: u32, + pub addr: u8, + } +} + +s! { + pub struct can_filter { + pub can_id: canid_t, + pub can_mask: canid_t, + } +} + +pub const CAN_INV_FILTER: canid_t = 0x20000000; diff --git a/src/reorg/linux_uapi/linux/can/j1939.rs b/src/reorg/linux_uapi/linux/can/j1939.rs new file mode 100644 index 0000000000000..fdf425ce6c0c1 --- /dev/null +++ b/src/reorg/linux_uapi/linux/can/j1939.rs @@ -0,0 +1,60 @@ +//! `linux/can/j1939.h` + +pub use crate::linux::can::*; + +pub const J1939_MAX_UNICAST_ADDR: c_uchar = 0xfd; +pub const J1939_IDLE_ADDR: c_uchar = 0xfe; +pub const J1939_NO_ADDR: c_uchar = 0xff; +pub const J1939_NO_NAME: c_ulong = 0; +pub const J1939_PGN_REQUEST: c_uint = 0x0ea00; +pub const J1939_PGN_ADDRESS_CLAIMED: c_uint = 0x0ee00; +pub const J1939_PGN_ADDRESS_COMMANDED: c_uint = 0x0fed8; +pub const J1939_PGN_PDU1_MAX: c_uint = 0x3ff00; +pub const J1939_PGN_MAX: c_uint = 0x3ffff; +pub const J1939_NO_PGN: c_uint = 0x40000; + +pub type pgn_t = u32; +pub type priority_t = u8; +pub type name_t = u64; + +pub const SOL_CAN_J1939: c_int = SOL_CAN_BASE + CAN_J1939; + +// FIXME(cleanup): these could use c_enum if it can accept anonymous enums. + +pub const SO_J1939_FILTER: c_int = 1; +pub const SO_J1939_PROMISC: c_int = 2; +pub const SO_J1939_SEND_PRIO: c_int = 3; +pub const SO_J1939_ERRQUEUE: c_int = 4; + +pub const SCM_J1939_DEST_ADDR: c_int = 1; +pub const SCM_J1939_DEST_NAME: c_int = 2; +pub const SCM_J1939_PRIO: c_int = 3; +pub const SCM_J1939_ERRQUEUE: c_int = 4; + +pub const J1939_NLA_PAD: c_int = 0; +pub const J1939_NLA_BYTES_ACKED: c_int = 1; +pub const J1939_NLA_TOTAL_SIZE: c_int = 2; +pub const J1939_NLA_PGN: c_int = 3; +pub const J1939_NLA_SRC_NAME: c_int = 4; +pub const J1939_NLA_DEST_NAME: c_int = 5; +pub const J1939_NLA_SRC_ADDR: c_int = 6; +pub const J1939_NLA_DEST_ADDR: c_int = 7; + +pub const J1939_EE_INFO_NONE: c_int = 0; +pub const J1939_EE_INFO_TX_ABORT: c_int = 1; +pub const J1939_EE_INFO_RX_RTS: c_int = 2; +pub const J1939_EE_INFO_RX_DPO: c_int = 3; +pub const J1939_EE_INFO_RX_ABORT: c_int = 4; + +s! { + pub struct j1939_filter { + pub name: name_t, + pub name_mask: name_t, + pub pgn: pgn_t, + pub pgn_mask: pgn_t, + pub addr: u8, + pub addr_mask: u8, + } +} + +pub const J1939_FILTER_MAX: c_int = 512; diff --git a/src/reorg/linux_uapi/linux/can/raw.rs b/src/reorg/linux_uapi/linux/can/raw.rs new file mode 100644 index 0000000000000..1f92a13edbba6 --- /dev/null +++ b/src/reorg/linux_uapi/linux/can/raw.rs @@ -0,0 +1,15 @@ +//! `linux/can/raw.h` + +pub use crate::linux::can::*; + +pub const SOL_CAN_RAW: c_int = SOL_CAN_BASE + CAN_RAW; +pub const CAN_RAW_FILTER_MAX: c_int = 512; + +// FIXME(cleanup): use `c_enum!`, which needs to be adapted to allow omitting a type. +pub const CAN_RAW_FILTER: c_int = 1; +pub const CAN_RAW_ERR_FILTER: c_int = 2; +pub const CAN_RAW_LOOPBACK: c_int = 3; +pub const CAN_RAW_RECV_OWN_MSGS: c_int = 4; +pub const CAN_RAW_FD_FRAMES: c_int = 5; +pub const CAN_RAW_JOIN_FILTERS: c_int = 6; +pub const CAN_RAW_XL_FRAMES: c_int = 7; diff --git a/src/reorg/linux_uapi/linux/mod.rs b/src/reorg/linux_uapi/linux/mod.rs new file mode 100644 index 0000000000000..4a9c04d6396b1 --- /dev/null +++ b/src/reorg/linux_uapi/linux/mod.rs @@ -0,0 +1,4 @@ +//! The `linux` directory within `include/uapi` in the Linux source tree. + +pub(crate) mod can; +pub use can::*; diff --git a/src/reorg/linux_uapi/mod.rs b/src/reorg/linux_uapi/mod.rs new file mode 100644 index 0000000000000..e0d4e094c435f --- /dev/null +++ b/src/reorg/linux_uapi/mod.rs @@ -0,0 +1,4 @@ +//! This directory maps to `include/uapi` in the Linux source tree. + +pub(crate) mod linux; +pub use linux::*; diff --git a/src/reorg/mod.rs b/src/reorg/mod.rs new file mode 100644 index 0000000000000..4006f5c82288d --- /dev/null +++ b/src/reorg/mod.rs @@ -0,0 +1,12 @@ +//! This module contains the future directory structure. If possible, new definitions should +//! get added here. +//! +//! Eventually everything should be moved over, and we will move this directory to the top +//! level in `src`. + +cfg_if! { + if #[cfg(target_os = "linux")] { + mod linux_uapi; + pub use linux_uapi::*; + } +} diff --git a/src/unix/bsd/netbsdlike/netbsd/mod.rs b/src/unix/bsd/netbsdlike/netbsd/mod.rs index a1d06ddd0dd7c..9fadf4840a1c7 100644 --- a/src/unix/bsd/netbsdlike/netbsd/mod.rs +++ b/src/unix/bsd/netbsdlike/netbsd/mod.rs @@ -39,7 +39,7 @@ pub type Elf64_Xword = u64; pub type iconv_t = *mut c_void; c_enum! { - fae_action { + enum fae_action { FAE_OPEN, FAE_DUP2, FAE_CLOSE, diff --git a/src/unix/linux_like/linux/mod.rs b/src/unix/linux_like/linux/mod.rs index 252f30dd7e905..1d0b0f29b98f6 100644 --- a/src/unix/linux_like/linux/mod.rs +++ b/src/unix/linux_like/linux/mod.rs @@ -60,15 +60,6 @@ cfg_if! { } } -// linux/can.h -pub type canid_t = u32; - -// linux/can/j1939.h -pub type can_err_mask_t = u32; -pub type pgn_t = u32; -pub type priority_t = u8; -pub type name_t = u64; - pub type iconv_t = *mut c_void; // linux/sctp.h @@ -86,7 +77,7 @@ cfg_if! { } c_enum! { - tpacket_versions { + enum tpacket_versions { TPACKET_V1, TPACKET_V2, TPACKET_V3, @@ -94,7 +85,7 @@ c_enum! { } c_enum! { - pid_type { + enum pid_type { PIDTYPE_PID, PIDTYPE_TGID, PIDTYPE_PGID, @@ -732,33 +723,6 @@ s! { pub ee_data: u32, } - // linux/can.h - pub struct __c_anonymous_sockaddr_can_tp { - pub rx_id: canid_t, - pub tx_id: canid_t, - } - - pub struct __c_anonymous_sockaddr_can_j1939 { - pub name: u64, - pub pgn: u32, - pub addr: u8, - } - - pub struct can_filter { - pub can_id: canid_t, - pub can_mask: canid_t, - } - - // linux/can/j1939.h - pub struct j1939_filter { - pub name: name_t, - pub name_mask: name_t, - pub pgn: pgn_t, - pub pgn_mask: pgn_t, - pub addr: u8, - pub addr_mask: u8, - } - // linux/seccomp.h pub struct seccomp_data { pub nr: c_int, @@ -1746,53 +1710,6 @@ s_no_extra_traits! { pub flags: __u32, } - // linux/can.h - #[repr(align(8))] - #[allow(missing_debug_implementations)] - pub struct can_frame { - pub can_id: canid_t, - // FIXME(1.0): this field was renamed to `len` in Linux 5.11 - pub can_dlc: u8, - __pad: u8, - __res0: u8, - pub len8_dlc: u8, - pub data: [u8; CAN_MAX_DLEN], - } - - #[repr(align(8))] - #[allow(missing_debug_implementations)] - pub struct canfd_frame { - pub can_id: canid_t, - pub len: u8, - pub flags: u8, - __res0: u8, - __res1: u8, - pub data: [u8; CANFD_MAX_DLEN], - } - - #[repr(align(8))] - #[allow(missing_debug_implementations)] - pub struct canxl_frame { - pub prio: canid_t, - pub flags: u8, - pub sdt: u8, - pub len: u16, - pub af: u32, - pub data: [u8; CANXL_MAX_DLEN], - } - - #[allow(missing_debug_implementations)] - pub union __c_anonymous_sockaddr_can_can_addr { - pub tp: __c_anonymous_sockaddr_can_tp, - pub j1939: __c_anonymous_sockaddr_can_j1939, - } - - #[allow(missing_debug_implementations)] - pub struct sockaddr_can { - pub can_family: crate::sa_family_t, - pub can_ifindex: c_int, - pub can_addr: __c_anonymous_sockaddr_can_can_addr, - } // linux/wireless.h pub union iwreq_data { @@ -4696,14 +4613,14 @@ pub const RTNLGRP_STATS: c_uint = 0x24; // linux/cn_proc.h c_enum! { - proc_cn_mcast_op { + enum proc_cn_mcast_op { PROC_CN_MCAST_LISTEN = 1, PROC_CN_MCAST_IGNORE = 2, } } c_enum! { - proc_cn_event { + enum proc_cn_event { PROC_EVENT_NONE = 0x00000000, PROC_EVENT_FORK = 0x00000001, PROC_EVENT_EXEC = 0x00000002, @@ -5515,112 +5432,6 @@ pub const EDOM: c_int = 33; pub const ERANGE: c_int = 34; pub const EWOULDBLOCK: c_int = EAGAIN; -// linux/can.h -pub const CAN_EFF_FLAG: canid_t = 0x80000000; -pub const CAN_RTR_FLAG: canid_t = 0x40000000; -pub const CAN_ERR_FLAG: canid_t = 0x20000000; -pub const CAN_SFF_MASK: canid_t = 0x000007FF; -pub const CAN_EFF_MASK: canid_t = 0x1FFFFFFF; -pub const CAN_ERR_MASK: canid_t = 0x1FFFFFFF; -pub const CANXL_PRIO_MASK: crate::canid_t = CAN_SFF_MASK; - -pub const CAN_SFF_ID_BITS: c_int = 11; -pub const CAN_EFF_ID_BITS: c_int = 29; -pub const CANXL_PRIO_BITS: c_int = CAN_SFF_ID_BITS; - -pub const CAN_MAX_DLC: c_int = 8; -pub const CAN_MAX_DLEN: usize = 8; -pub const CANFD_MAX_DLC: c_int = 15; -pub const CANFD_MAX_DLEN: usize = 64; - -pub const CANFD_BRS: c_int = 0x01; -pub const CANFD_ESI: c_int = 0x02; -pub const CANFD_FDF: c_int = 0x04; - -pub const CANXL_MIN_DLC: c_int = 0; -pub const CANXL_MAX_DLC: c_int = 2047; -pub const CANXL_MAX_DLC_MASK: c_int = 0x07FF; -pub const CANXL_MIN_DLEN: usize = 1; -pub const CANXL_MAX_DLEN: usize = 2048; - -pub const CANXL_XLF: c_int = 0x80; -pub const CANXL_SEC: c_int = 0x01; - -pub const CAN_MTU: usize = size_of::(); -pub const CANFD_MTU: usize = size_of::(); -pub const CANXL_MTU: usize = size_of::(); -// FIXME(offset_of): use `core::mem::offset_of!` once that is available -// https://github.com/rust-lang/rfcs/pull/3308 -// pub const CANXL_HDR_SIZE: usize = core::mem::offset_of!(canxl_frame, data); -pub const CANXL_HDR_SIZE: usize = 12; -pub const CANXL_MIN_MTU: usize = CANXL_HDR_SIZE + 64; -pub const CANXL_MAX_MTU: usize = CANXL_MTU; - -pub const CAN_RAW: c_int = 1; -pub const CAN_BCM: c_int = 2; -pub const CAN_TP16: c_int = 3; -pub const CAN_TP20: c_int = 4; -pub const CAN_MCNET: c_int = 5; -pub const CAN_ISOTP: c_int = 6; -pub const CAN_J1939: c_int = 7; -pub const CAN_NPROTO: c_int = 8; - -pub const SOL_CAN_BASE: c_int = 100; - -pub const CAN_INV_FILTER: canid_t = 0x20000000; -pub const CAN_RAW_FILTER_MAX: c_int = 512; - -// linux/can/raw.h -pub const SOL_CAN_RAW: c_int = SOL_CAN_BASE + CAN_RAW; -pub const CAN_RAW_FILTER: c_int = 1; -pub const CAN_RAW_ERR_FILTER: c_int = 2; -pub const CAN_RAW_LOOPBACK: c_int = 3; -pub const CAN_RAW_RECV_OWN_MSGS: c_int = 4; -pub const CAN_RAW_FD_FRAMES: c_int = 5; -pub const CAN_RAW_JOIN_FILTERS: c_int = 6; -pub const CAN_RAW_XL_FRAMES: c_int = 7; - -// linux/can/j1939.h -pub const SOL_CAN_J1939: c_int = SOL_CAN_BASE + CAN_J1939; - -pub const J1939_MAX_UNICAST_ADDR: c_uchar = 0xfd; -pub const J1939_IDLE_ADDR: c_uchar = 0xfe; -pub const J1939_NO_ADDR: c_uchar = 0xff; -pub const J1939_NO_NAME: c_ulong = 0; -pub const J1939_PGN_REQUEST: c_uint = 0x0ea00; -pub const J1939_PGN_ADDRESS_CLAIMED: c_uint = 0x0ee00; -pub const J1939_PGN_ADDRESS_COMMANDED: c_uint = 0x0fed8; -pub const J1939_PGN_PDU1_MAX: c_uint = 0x3ff00; -pub const J1939_PGN_MAX: c_uint = 0x3ffff; -pub const J1939_NO_PGN: c_uint = 0x40000; - -pub const SO_J1939_FILTER: c_int = 1; -pub const SO_J1939_PROMISC: c_int = 2; -pub const SO_J1939_SEND_PRIO: c_int = 3; -pub const SO_J1939_ERRQUEUE: c_int = 4; - -pub const SCM_J1939_DEST_ADDR: c_int = 1; -pub const SCM_J1939_DEST_NAME: c_int = 2; -pub const SCM_J1939_PRIO: c_int = 3; -pub const SCM_J1939_ERRQUEUE: c_int = 4; - -pub const J1939_NLA_PAD: c_int = 0; -pub const J1939_NLA_BYTES_ACKED: c_int = 1; -pub const J1939_NLA_TOTAL_SIZE: c_int = 2; -pub const J1939_NLA_PGN: c_int = 3; -pub const J1939_NLA_SRC_NAME: c_int = 4; -pub const J1939_NLA_DEST_NAME: c_int = 5; -pub const J1939_NLA_SRC_ADDR: c_int = 6; -pub const J1939_NLA_DEST_ADDR: c_int = 7; - -pub const J1939_EE_INFO_NONE: c_int = 0; -pub const J1939_EE_INFO_TX_ABORT: c_int = 1; -pub const J1939_EE_INFO_RX_RTS: c_int = 2; -pub const J1939_EE_INFO_RX_DPO: c_int = 3; -pub const J1939_EE_INFO_RX_ABORT: c_int = 4; - -pub const J1939_FILTER_MAX: c_int = 512; - // linux/sctp.h pub const SCTP_FUTURE_ASSOC: c_int = 0; pub const SCTP_CURRENT_ASSOC: c_int = 1; diff --git a/triagebot.toml b/triagebot.toml index 6aa18772a750e..ab09ecf8b371a 100644 --- a/triagebot.toml +++ b/triagebot.toml @@ -61,7 +61,10 @@ trigger_files = [ trigger_files = ["src/unix/solarish/illumos.rs"] [autolabel."O-linux"] -trigger_files = ["src/unix/linux_like/linux"] +trigger_files = [ + "src/unix/linux_like/linux", + "src/reorg/linux_uapi", +] [autolabel."O-linux-like"] trigger_files = ["src/unix/linux_like/mod.rs"]