-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
install: implement copying from streams #6893
Conversation
yikes, seems like it's failing on Android. i'll look into that |
GNU testsuite comparison:
|
GNU testsuite comparison:
|
ca83797
to
4169fb0
Compare
GNU testsuite comparison:
|
okay fixed the unit test, the Android emulator seem to have |
e7fde9c
to
4167374
Compare
oh yeah forgot to ask again. are there anything else i need to add or remove? |
looks good to me :) |
Maybe we put splice.rs inside uucore. That good? |
@sylvestre hey i'd love this to get merged since this bug is literally making my kernel disappear after every kernel upgrade 🤣 the pattern I will look into squashing stream-copying functions into uucore--maybe also using it for |
Yeah |
4167374
to
f71bf79
Compare
Splice is a Linux-specific syscall that allows direct data copying from one file descriptor to another without user-space buffer. As of now, this is used by `cp`, `cat`, and `install` when compiled for Linux and Android.
f71bf79
to
f58f5b5
Compare
i guess you noticed that a few jobs are failing :) |
sorry, dont have like 10 virtual machines yet to check my code :} are CI checks discouraged here? also for the gazillion commits, i will squash them together |
nope, this is fine :) |
GNU testsuite comparison:
|
once it will be ready to be merged, it would be nice to separate the uucore changes into a separate PR to make the change more atomic |
Sure |
@sylvestre the newly made |
in the feature - features = ["splice"] } ? |
uh, i'm assuming you mean for each of the utilities? or am i misunderstanding something? i did have that but for some reason i can't pass the FreeBSD tests |
what is the error message ? |
this help is also misleading since that's just itself :p
i dont think i understand how rust crates work lol |
GNU testsuite comparison:
|
d3f55e0
to
7509998
Compare
nvm works now. my bad, i wrote unix instead of linux & android |
GNU testsuite comparison:
|
i'm opening separate PRs i guess |
yeah, it will help with the review, thanks :) |
This PR resolves #5080 and #4387 by copying
cat
's logic to copy from stream to a file.However, I'm not sure about testing the cases for each stream type (other than standard input which I had provided in the test). I think it's better to be done in a future refactor where the logic for copying files (and streams) are combined into a single common utility.