Format after patches have been applied
This commit is contained in:
parent
7f6ee12526
commit
d633d8e074
4 changed files with 17 additions and 13 deletions
|
@ -4,15 +4,20 @@
|
|||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use super::raw::{AsRawFd, FromRawFd, IntoRawFd, RawFd};
|
||||
#[cfg(not(target_os = "trusty"))]
|
||||
use crate::fs;
|
||||
use crate::marker::PhantomData;
|
||||
use crate::mem::ManuallyDrop;
|
||||
#[cfg(not(any(target_arch = "wasm32", target_env = "sgx", target_os = "hermit", target_os = "trusty")))]
|
||||
#[cfg(not(any(
|
||||
target_arch = "wasm32",
|
||||
target_env = "sgx",
|
||||
target_os = "hermit",
|
||||
target_os = "trusty"
|
||||
)))]
|
||||
use crate::sys::cvt;
|
||||
#[cfg(not(target_os = "trusty"))]
|
||||
use crate::sys_common::{AsInner, FromInner, IntoInner};
|
||||
use crate::{fmt, io};
|
||||
#[cfg(not(target_os = "trusty"))]
|
||||
use crate::fs;
|
||||
|
||||
type ValidRawFd = core::num::niche_types::NotAllOnes<RawFd>;
|
||||
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
#[cfg(target_os = "hermit")]
|
||||
use hermit_abi as libc;
|
||||
|
||||
#[cfg(not(target_os = "trusty"))]
|
||||
use crate::fs;
|
||||
use crate::io;
|
||||
#[cfg(target_os = "hermit")]
|
||||
use crate::os::hermit::io::OwnedFd;
|
||||
#[cfg(not(target_os = "hermit"))]
|
||||
|
@ -17,9 +20,6 @@ use crate::os::unix::io::OwnedFd;
|
|||
use crate::os::wasi::io::OwnedFd;
|
||||
#[cfg(not(target_os = "trusty"))]
|
||||
use crate::sys_common::{AsInner, IntoInner};
|
||||
#[cfg(not(target_os = "trusty"))]
|
||||
use crate::fs;
|
||||
use crate::io;
|
||||
|
||||
/// Raw file descriptors.
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
|
||||
#[path = "../unsupported/args.rs"]
|
||||
pub mod args;
|
||||
#[path = "../unsupported/common.rs"]
|
||||
#[deny(unsafe_op_in_unsafe_fn)]
|
||||
mod common;
|
||||
#[path = "../unsupported/env.rs"]
|
||||
pub mod env;
|
||||
#[path = "../unsupported/fs.rs"]
|
||||
|
@ -17,12 +20,9 @@ pub mod pipe;
|
|||
#[path = "../unsupported/process.rs"]
|
||||
pub mod process;
|
||||
pub mod stdio;
|
||||
#[path = "../unsupported/time.rs"]
|
||||
pub mod time;
|
||||
#[path = "../unsupported/thread.rs"]
|
||||
pub mod thread;
|
||||
#[path = "../unsupported/common.rs"]
|
||||
#[deny(unsafe_op_in_unsafe_fn)]
|
||||
mod common;
|
||||
#[path = "../unsupported/time.rs"]
|
||||
pub mod time;
|
||||
|
||||
pub use common::*;
|
||||
|
|
|
@ -59,8 +59,7 @@ pub fn panic_output() -> Option<impl io::Write> {
|
|||
}
|
||||
|
||||
fn _write(fd: i32, message: &[u8]) -> io::Result<usize> {
|
||||
let mut iov =
|
||||
libc::iovec { iov_base: message.as_ptr() as *mut _, iov_len: message.len() };
|
||||
let mut iov = libc::iovec { iov_base: message.as_ptr() as *mut _, iov_len: message.len() };
|
||||
loop {
|
||||
// SAFETY: syscall, safe arguments.
|
||||
let ret = unsafe { libc::writev(fd, &iov, 1) };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue