mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-13 10:29:16 +00:00
std: sys: stdio: uefi: Tread UNSUPPORTED Status as read(0)
Allows implementing Stdio::Null for Command in a deterministic manner. Signed-off-by: Ayush Singh <ayush@beagleboard.org>
This commit is contained in:
parent
a404015775
commit
af25995d11
@ -142,8 +142,12 @@ impl io::Write for Stderr {
|
||||
// UTF-16 character should occupy 4 bytes at most in UTF-8
|
||||
pub const STDIN_BUF_SIZE: usize = 4;
|
||||
|
||||
pub fn is_ebadf(_err: &io::Error) -> bool {
|
||||
false
|
||||
pub fn is_ebadf(err: &io::Error) -> bool {
|
||||
if let Some(x) = err.raw_os_error() {
|
||||
r_efi::efi::Status::UNSUPPORTED.as_usize() == x
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
pub fn panic_output() -> Option<impl io::Write> {
|
||||
|
Loading…
Reference in New Issue
Block a user