Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose len8_dlc field of can_frame struct. #3357

Merged
merged 1 commit into from
Nov 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/unix/linux_like/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1580,10 +1580,11 @@ s_no_extra_traits! {
#[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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While you're here, mind adding a comment // FIXME(1.0): this field was renamed to `can_len` based on the docs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added!

__pad: u8,
__res0: u8,
__res1: u8,
pub len8_dlc: u8,
pub data: [u8; CAN_MAX_DLEN],
}

Expand Down