Repository navigation
mknod: replace nix::sys::stat with rustix - #12321
mattsu2020 wants to merge 2 commits into
Conversation
|
GNU testsuite comparison: |
Merging this PR will not alter performance1 warning, 1 note
Comparing Footnotes
|
|
|
Thanks for the suggestion! You're right |
|
Is it able to open a PR on rustix to support |
I created the PR, but there are some errors on the Rustix side during CI, so I'll review the code again once the fixes are complete. |
|
Thankyou |
|
Depends on bytecodealliance/rustix#1691. |
|
Compiles successfully on Redox: cargo check -q -p uu_mknod --target x86_64-unknown-redox |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
afe71e6 to
9ddd0cf
Compare
This comment was marked as resolved.
This comment was marked as resolved.
| use clap::{Arg, ArgAction, Command, value_parser}; | ||
| use nix::libc::{S_IRGRP, S_IROTH, S_IRUSR, S_IWGRP, S_IWOTH, S_IWUSR, mode_t}; | ||
| use nix::sys::stat::{Mode, SFlag, dev_t, mknod as nix_mknod}; | ||
| use rustix::fs::{CWD, Dev, FileType as RustixFileType, Mode, mknodat}; |
There was a problem hiding this comment.
If we drop nix, as RustixFileType is innecessary.
There was a problem hiding this comment.
thanks.
The code is much cleaner now.
There was a problem hiding this comment.
rustix::fs::FileType has additional variants that we don't currently handle. This change could expose us to unexpected behavior when encountering those variants through the public API.
There was a problem hiding this comment.
I see, so we need to set some restrictions.
I've added restrictions at the entry point.
There was a problem hiding this comment.
mknod isn't the entry point, so the change is still not correct.
|
thanks for working on this! |
c69fb4a to
85eb326
Compare
|
Can we use |
We should ensure git sources fail CI: #16366. |
Replace
nix::sys::statinmknodwithrustix::fsand remove the directnixdependency.Depends on bytecodealliance/rustix#1625.
Additional FIFO tests are split into #16348.