-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
std: sys: fs: uefi: Implement File::write #150852
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
|
r? @ChrisDenton rustbot has assigned @ChrisDenton. Use |
beb68a8 to
8870e9c
Compare
library/std/src/sys/fs/uefi.rs
Outdated
| ) | ||
| }; | ||
|
|
||
| if r.is_error() { |
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.
I think this should be
| if r.is_error() { | |
| if buf_size != 0 && r.is_error() { |
since the data may have been partially written already before the error occurred and io::Write mandates that
If an error is returned then no bytes in the buffer were written to this writer.
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.
Fixed to if buf_size == 0 && r.is_error()
|
Reminder, once the PR becomes ready for a review, use |
Tested using OVMF on QEMU. Signed-off-by: Ayush Singh <ayush@beagleboard.org>
8870e9c to
ccc86f2
Compare
|
@rustbot ready |
|
@bors r+ |
std: sys: fs: uefi: Implement File::write Tested using OVMF on QEMU. @rustbot label +O-UEFI
std: sys: fs: uefi: Implement File::write Tested using OVMF on QEMU. @rustbot label +O-UEFI
std: sys: fs: uefi: Implement File::write Tested using OVMF on QEMU. @rustbot label +O-UEFI
Rollup of 11 pull requests Successful merges: - #148196 (Implement create_dir_all() to operate iteratively instead of recursively) - #150494 ( Fix dso_local for external statics with linkage) - #150788 (THIR patterns: Replace `AscribeUserType` and `ExpandedConstant` wrappers with per-node data) - #150799 (Fix ICE: can't type-check body of DefId for issue #148729) - #150804 (Remove std_detect_file_io and std_detect_dlsym_getauxval features) - #150852 (std: sys: fs: uefi: Implement File::write) - #150871 (Use f64 NaN in documentation instead of sqrt(-1.0)) - #150878 (Emit an error for linking staticlibs on BPF) - #150911 (Add missing documentation for globs feature) - #150913 (compiler: Forward attributes to eii-expanded macros) - #150916 (Once again, reorganize the EII tests a bit) r? @ghost
Rollup of 12 pull requests Successful merges: - #150947 (alloctests: Don't run the longer partial-sort tests under Miri) - #148196 (Implement create_dir_all() to operate iteratively instead of recursively) - #150494 ( Fix dso_local for external statics with linkage) - #150788 (THIR patterns: Replace `AscribeUserType` and `ExpandedConstant` wrappers with per-node data) - #150799 (Fix ICE: can't type-check body of DefId for issue #148729) - #150804 (Remove std_detect_file_io and std_detect_dlsym_getauxval features) - #150852 (std: sys: fs: uefi: Implement File::write) - #150871 (Use f64 NaN in documentation instead of sqrt(-1.0)) - #150878 (Emit an error for linking staticlibs on BPF) - #150911 (Add missing documentation for globs feature) - #150913 (compiler: Forward attributes to eii-expanded macros) - #150916 (Once again, reorganize the EII tests a bit) r? @ghost
Tested using OVMF on QEMU.
@rustbot label +O-UEFI