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

feat: add support for mtd UAPI #110

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

RaitoBezarius
Copy link

This adds MTD (mtd/mtd-user.h) UAPI pieces, useful to manipulate MTD devices from Rust.

@RaitoBezarius
Copy link
Author

Ah shoot, this is missing all the ioctl because of the functional macro problem with bindgen.

This adds MTD (`mtd/mtd-user.h`) UAPI pieces, useful to manipulate MTD devices
from Rust.

This adds also a few `ioctl` exposed by this userspace API.

Signed-off-by: Raito Bezarius <[email protected]>
@RaitoBezarius
Copy link
Author

I am unable to run fully the generate.sh script because I am running NixOS and this script relies on a lot of non-portable assumptions for this sort of system (e.g. system prefix for cross-toolchains, locations for cross-toolchains includes, etc.). I will leave it to someone else to do it.

This adds also the UBI UAPI and its ioctl.

Signed-off-by: Raito Bezarius <[email protected]>
@RaitoBezarius
Copy link
Author

@sunfishcode friendly ping; are you interested in that contribution? If so, I can clean it up if needed. Thanks!

Copy link
Owner

@sunfishcode sunfishcode left a comment

Choose a reason for hiding this comment

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

Sorry for the delay here, yes, I think this makes sense. Just one issue below:

@@ -1,1606 +1,3 @@
/* automatically generated by rust-bindgen 0.66.1 */

pub const FIONREAD: u32 = 21531;
Copy link
Owner

Choose a reason for hiding this comment

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

It looks like a bunch of ioctl codes here are getting removed from src/aarch64/ioctl.rs. Do you know what's causing this?

Copy link
Author

Choose a reason for hiding this comment

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

Uhm, makes no sense, the only reasonable explaination is usually that functional macro (which ioctl make use of) are confusing bindgen in some way that I may have hit involuntarily.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants