-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Define more ioctl codes on riscv32gc-unknown-linux-gnu #4382
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
Define more ioctl codes on riscv32gc-unknown-linux-gnu #4382
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any idea why these are gated in the first place? All of the constants are in https://github.com/torvalds/linux/blob/bec7dcbc242c6c087cede1a6fdfaeb5d6eaf25bf/include/uapi/linux/fs.h, I don't know why any platforms wouldn't have them unless they have no fs support.
In any case LGTM, blocked on CI issues.
they all do exist but values are different sadly
|
Oh, from differences in sizes passed to libc/src/unix/linux_like/linux/mod.rs Lines 5991 to 6025 in 30f03b2
|
Actually @sunfishcode would you mind just changing the relevant blocks to make use of those instead? I think we may as well use this as an excuse to get rid of some pre- |
Define ioctl codes including `FICLONE` and `FS_IOC32_GETVERSION` using `_IOR` and `_IOW` so that they're automatically supported on all architectures, including riscv32gc-unknown-linux-gnu.
20a1dff
to
4b439b0
Compare
@tgross35 Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great cleanup, thanks!
Define ioctl codes including `FICLONE` and `FS_IOC32_GETVERSION` using `_IOR` and `_IOW` so that they're automatically supported on all architectures, including riscv32gc-unknown-linux-gnu. (backport <rust-lang#4382>) (cherry picked from commit 4b439b0)
rust-lang/libc#4382 was merge as rust-lang/libc@4b439b0 (From OE-Core rev: bf0be4ef8afa5031a9151f19ebcdcf58722a6238) Signed-off-by: Yoann Congal <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
rust-lang/libc#4382 was merge as rust-lang/libc@4b439b0 Signed-off-by: Yoann Congal <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
rust-lang/libc#4382 was merge as rust-lang/libc@4b439b0 (From OE-Core rev: 3a81240c93fd230e45082ef391730927916944c4) Signed-off-by: Yoann Congal <[email protected]> Signed-off-by: Mathieu Dubois-Briand <[email protected]>
rust-lang/libc#4382 was merge as rust-lang/libc@4b439b0 (From OE-Core rev: a1e6e02abd27edf7101189b0bac8c776861d909c) Signed-off-by: Yoann Congal <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
rust-lang/libc#4382 was merge as rust-lang/libc@4b439b0 Signed-off-by: Yoann Congal <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
rust-lang/libc#4382 was merge as rust-lang/libc@4b439b0 (From OE-Core rev: a1e6e02abd27edf7101189b0bac8c776861d909c) Signed-off-by: Yoann Congal <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
rust-lang/libc#4382 was merge as rust-lang/libc@4b439b0 (From OE-Core rev: a1e6e02abd27edf7101189b0bac8c776861d909c) Signed-off-by: Yoann Congal <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
rust-lang/libc#4382 was merge as rust-lang/libc@4b439b0 (From OE-Core rev: a1e6e02abd27edf7101189b0bac8c776861d909c) Signed-off-by: Yoann Congal <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
rust-lang/libc#4382 was merge as rust-lang/libc@4b439b0 (From OE-Core rev: 6f72a9ca498e4c18b6e6bfb6f10547641b0c3daa) Signed-off-by: Yoann Congal <[email protected]> Signed-off-by: Mathieu Dubois-Briand <[email protected]>
rust-lang/libc#4382 was merge as rust-lang/libc@4b439b0 (From OE-Core rev: 6f72a9ca498e4c18b6e6bfb6f10547641b0c3daa) Signed-off-by: Yoann Congal <[email protected]> Signed-off-by: Mathieu Dubois-Briand <[email protected]>
rust-lang/libc#4382 was merge as rust-lang/libc@4b439b0 (From OE-Core rev: d34f49cc604733c7d714a72b3a3d66a99aa65c79) Signed-off-by: Yoann Congal <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
rust-lang/libc#4382 was merge as rust-lang/libc@4b439b0 Signed-off-by: Yoann Congal <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
rust-lang/libc#4382 was merge as rust-lang/libc@4b439b0 (From OE-Core rev: d34f49cc604733c7d714a72b3a3d66a99aa65c79) Signed-off-by: Yoann Congal <yoann.congalsmile.fr> Signed-off-by: Richard Purdie <richard.purdielinuxfoundation.org>
rust-lang/libc#4382 was merge as rust-lang/libc@4b439b0 (From OE-Core rev: d34f49cc604733c7d714a72b3a3d66a99aa65c79) Signed-off-by: Yoann Congal <yoann.congalsmile.fr> Signed-off-by: Richard Purdie <richard.purdielinuxfoundation.org>
rust-lang/libc#4382 was merge as rust-lang/libc@4b439b0 (From OE-Core rev: d34f49cc604733c7d714a72b3a3d66a99aa65c79) Signed-off-by: Yoann Congal <yoann.congalsmile.fr> Signed-off-by: Richard Purdie <richard.purdielinuxfoundation.org>
Description
Define ioctl codes including
FICLONE
andFS_IOC32_GETVERSION
on riscv32gc-unknown-linux-gnu.Sources
The values match the values in the linux-raw-sys crate, which is autogenerated from Linux sources:
https://github.com/sunfishcode/linux-raw-sys/blob/21a3b3b1fada619179810ca92404690d45890f29/src/riscv32/ioctl.rs#L248
Checklist
libc-test/semver
have been updated*LAST
or*MAX
areincluded (see #3131)
cd libc-test && cargo test --target mytarget
);especially relevant for platforms that may not be checked in CI