-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
std: sys: fs: uefi: Implement File::seek #150918
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
Conversation
|
@bors r=nicholasbishop,jhpratt rollup |
|
|
||
| let off = match pos { | ||
| SeekFrom::Start(p) => p, | ||
| SeekFrom::End(p) => { |
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.
You could special-case SeekFrom::End(0) here and use 0xFFFFFFFFFFFFFFFF as offset, since that causes the position to be set to the end of the file without having to look up the length.
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.
Added
|
Take the previous recommendation at your own discretion. Feel free to approve the PR yourself either way. @bors r- delegate+ |
|
Commit 7c428e0 has been unapproved. |
- Tested using OVMF on QEMU. Signed-off-by: Ayush Singh <[email protected]>
7c428e0 to
6878e73
Compare
|
@bors r+ |
std: sys: fs: uefi: Implement File::seek - Tested using OVMF on QEMU. @rustbot label +O-UEFI
std: sys: fs: uefi: Implement File::seek - Tested using OVMF on QEMU. @rustbot label +O-UEFI
Rollup of 14 pull requests Successful merges: - #148941 (stabilize `Peekable::next_if_map` (`#![feature(peekable_next_if_map)]`)) - #150368 (adding Ordering enum to minicore.rs, importing minicore in "tests/assembly-llvm/rust-abi-arg-attr.rs" test file) - #150668 (Unix implementation for stdio set/take/replace) - #150743 (Reword the collect() docs) - #150776 (Fix the connect_error test on FreeBSD 15+) - #150781 (Use `rand` crate more idiomatically) - #150786 (mGCA: Support array expression as direct const arguments) - #150812 (Bump `diesel` to the most recent commit in `cargotest`) - #150862 (std: sys: fs: uefi: Implement File::flush) - #150873 (Reenable GCC CI download) - #150908 (llvm: Update `reliable_f16` configuration for LLVM22) - #150918 (std: sys: fs: uefi: Implement File::seek) - #150922 (Subscribe myself to attr parsing) - #150930 (Remove special case for `AllowedTargets::CrateLevel`) r? @ghost
Rollup of 14 pull requests Successful merges: - #148941 (stabilize `Peekable::next_if_map` (`#![feature(peekable_next_if_map)]`)) - #150368 (adding Ordering enum to minicore.rs, importing minicore in "tests/assembly-llvm/rust-abi-arg-attr.rs" test file) - #150668 (Unix implementation for stdio set/take/replace) - #150743 (Reword the collect() docs) - #150776 (Fix the connect_error test on FreeBSD 15+) - #150781 (Use `rand` crate more idiomatically) - #150812 (Bump `diesel` to the most recent commit in `cargotest`) - #150862 (std: sys: fs: uefi: Implement File::flush) - #150873 (Reenable GCC CI download) - #150908 (llvm: Update `reliable_f16` configuration for LLVM22) - #150918 (std: sys: fs: uefi: Implement File::seek) - #150922 (Subscribe myself to attr parsing) - #150930 (Remove special case for `AllowedTargets::CrateLevel`) - #150942 (Port `#[rustc_has_incoherent_inherent_impls]` to attribute parser) Failed merges: - #150943 (Port `#[must_not_suspend]` to attribute parser) r? @ghost
Rollup of 14 pull requests Successful merges: - rust-lang/rust#148941 (stabilize `Peekable::next_if_map` (`#![feature(peekable_next_if_map)]`)) - rust-lang/rust#150368 (adding Ordering enum to minicore.rs, importing minicore in "tests/assembly-llvm/rust-abi-arg-attr.rs" test file) - rust-lang/rust#150668 (Unix implementation for stdio set/take/replace) - rust-lang/rust#150743 (Reword the collect() docs) - rust-lang/rust#150776 (Fix the connect_error test on FreeBSD 15+) - rust-lang/rust#150781 (Use `rand` crate more idiomatically) - rust-lang/rust#150812 (Bump `diesel` to the most recent commit in `cargotest`) - rust-lang/rust#150862 (std: sys: fs: uefi: Implement File::flush) - rust-lang/rust#150873 (Reenable GCC CI download) - rust-lang/rust#150908 (llvm: Update `reliable_f16` configuration for LLVM22) - rust-lang/rust#150918 (std: sys: fs: uefi: Implement File::seek) - rust-lang/rust#150922 (Subscribe myself to attr parsing) - rust-lang/rust#150930 (Remove special case for `AllowedTargets::CrateLevel`) - rust-lang/rust#150942 (Port `#[rustc_has_incoherent_inherent_impls]` to attribute parser) Failed merges: - rust-lang/rust#150943 (Port `#[must_not_suspend]` to attribute parser) r? @ghost
@rustbot label +O-UEFI