Skip to content

Conversation

coolreader18
Copy link
Contributor

Description

There's already can::{raw, j1939}, and this adds bcm.

Sources

https://github.com/torvalds/linux/blob/b320789d6883cc00ac78ce83bccbfe7ed58afcf0/include/uapi/linux/can/bcm.h

Checklist

  • Relevant tests in libc-test/semver have been updated
  • No placeholder or unstable values like *LAST or *MAX are
    included (see #3131)
  • Tested locally (cd libc-test && cargo test --target mytarget);
    especially relevant for platforms that may not be checked in CI

@rustbot label +stable-nominated

@rustbot rustbot added O-linux S-waiting-on-review stable-nominated This PR should be considered for cherry-pick to libc's stable release branch labels Sep 1, 2025
Comment on lines 23 to 34
pub const TX_SETUP: crate::__u32 = 1;
pub const TX_DELETE: crate::__u32 = 2;
pub const TX_READ: crate::__u32 = 3;
pub const TX_SEND: crate::__u32 = 4;
pub const RX_SETUP: crate::__u32 = 5;
pub const RX_DELETE: crate::__u32 = 6;
pub const RX_READ: crate::__u32 = 7;
pub const TX_STATUS: crate::__u32 = 8;
pub const TX_EXPIRED: crate::__u32 = 9;
pub const RX_STATUS: crate::__u32 = 10;
pub const RX_TIMEOUT: crate::__u32 = 11;
pub const RX_CHANGED: crate::__u32 = 12;
Copy link
Contributor

Choose a reason for hiding this comment

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

Use the c_enum! macro since the source is an enum

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The original enum has no name, though

Copy link
Contributor Author

@coolreader18 coolreader18 Sep 5, 2025

Choose a reason for hiding this comment

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

Added anonymous enum support to c_enum!, though I totally get if you'd rather that be split to another PR.

@coolreader18
Copy link
Contributor Author

@rustbot label -S-waiting-on-author +S-waiting-on-review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-linux S-waiting-on-review stable-nominated This PR should be considered for cherry-pick to libc's stable release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants