/third_party/rust/crates/rustix/tests/io/ |
H A D | poll.rs | 14 assert_eq!(poll_fds[0].as_fd().as_raw_fd(), reader.as_fd().as_raw_fd()); in test_poll() 20 assert_eq!(poll_fds[0].as_fd().as_raw_fd(), reader.as_fd().as_raw_fd()); in test_poll() 29 assert_eq!(poll_fds[0].as_fd().as_raw_fd(), reader.as_fd().as_raw_fd()); in test_poll() 40 assert_eq!(poll_fds[0].as_fd().as_raw_fd(), reader.as_fd().as_raw_fd()); in test_poll() 46 assert_eq!(poll_fds[0].as_fd().as_raw_fd(), reader.as_fd().as_raw_fd()); in test_poll() [all...] |
H A D | from_into.rs | 15 let raw = file.as_raw_fd(); in test_owned() 16 assert_eq!(raw, file.as_fd().as_raw_fd()); in test_owned()
|
H A D | epoll.rs | 41 let raw_listen_sock = listen_sock.as_fd().as_raw_fd(); in server() 48 if target.as_raw_fd() == raw_listen_sock { in server()
|
/third_party/rust/crates/rustix/tests/termios/ |
H A D | isatty.rs | 31 libc::isatty(std::io::stdout().as_raw_fd()) != 0 in stdout_stderr_terminals() 34 libc::isatty(std::io::stderr().as_raw_fd()) != 0 in stdout_stderr_terminals() 57 rustix::io::stdin().as_raw_fd(), in stdio_descriptors() 58 std::io::stdin().as_raw_fd() in stdio_descriptors() 61 rustix::io::stdout().as_raw_fd(), in stdio_descriptors() 62 std::io::stdout().as_raw_fd() in stdio_descriptors() 65 rustix::io::stderr().as_raw_fd(), in stdio_descriptors() 66 std::io::stderr().as_raw_fd() in stdio_descriptors()
|
/third_party/rust/crates/nix/test/ |
H A D | test_sendfile.rs | 26 let res = sendfile(wr, tmp.as_raw_fd(), Some(&mut offset), 2).unwrap(); in test_sendfile_linux() 48 let res = sendfile64(wr, tmp.as_raw_fd(), Some(&mut offset), 2).unwrap(); in test_sendfile64_linux() 86 tmp.as_raw_fd(), in test_sendfile_freebsd() 87 wr.as_raw_fd(), in test_sendfile_freebsd() 137 tmp.as_raw_fd(), in test_sendfile_dragonfly() 138 wr.as_raw_fd(), in test_sendfile_dragonfly() 186 tmp.as_raw_fd(), in test_sendfile_darwin() 187 wr.as_raw_fd(), in test_sendfile_darwin()
|
H A D | test_pty.rs | 36 assert!(master_fd.as_raw_fd() > 0); in test_ptsname_equivalence() 53 assert!(master_fd.as_raw_fd() > 0); in test_ptsname_copy() 70 assert!(master_fd.as_raw_fd() > 0); in test_ptsname_r_copy() 87 assert!(master1_fd.as_raw_fd() > 0); in test_ptsname_unique() 91 assert!(master2_fd.as_raw_fd() > 0); in test_ptsname_unique() 154 assert!(master.as_raw_fd() > 0); in test_open_ptty_pair() 155 assert!(slave.as_raw_fd() > 0); in test_open_ptty_pair() 169 make_raw(slave.as_raw_fd()); in test_read_ptty_pair() 186 make_raw(slave.as_raw_fd()); in test_write_ptty_pair()
|
H A D | test_fcntl.rs | 266 tmp1.as_raw_fd(), in test_copy_file_range() 268 tmp2.as_raw_fd(), in test_copy_file_range() 291 tmp.as_raw_fd(), in test_splice() 363 let fd = tmp.as_raw_fd(); in test_fallocate() 385 let fd = tmp.as_raw_fd(); in test_ofd_write_lock() 423 let fd = tmp.as_raw_fd(); in test_ofd_read_lock() 494 let fd = tmp.as_raw_fd(); in test_success() 536 let fd = tmp.as_raw_fd(); in success()
|
H A D | test_stat.rs | 106 let fstat_result = fstat(file.as_raw_fd()); in test_stat_and_fstat() 145 let fstat_result = fstat(link.as_raw_fd()); in test_stat_fstat_lstat() 158 fchmod(file.as_raw_fd(), mode1).unwrap(); in test_fchmod() 165 fchmod(file.as_raw_fd(), mode2).unwrap(); in test_fchmod() 405 target_dir.as_raw_fd(), in test_mknodat() 413 target_dir.as_raw_fd(), in test_mknodat()
|
H A D | test_ptymaster_drop.rs | 17 close(m.as_raw_fd()).unwrap(); in test_double_close()
|
/third_party/rust/crates/nix/test/sys/ |
H A D | test_ioctl.rs | 210 let res = unsafe { tiocnxcl(file.as_raw_fd()) }; in test_ioctl_none_bad() 219 let res = unsafe { tcgets(file.as_raw_fd(), &mut termios) }; in test_ioctl_read_bad() 227 let res = unsafe { tcsbrk(file.as_raw_fd(), 0) }; in test_ioctl_write_int_bad() 236 let res = unsafe { tcsets(file.as_raw_fd(), &termios) }; in test_ioctl_write_ptr_bad() 247 let res = unsafe { log_status(file.as_raw_fd()) }; in test_ioctl_none() 266 let res = unsafe { s_audio(file.as_raw_fd(), &data) }; in test_ioctl_write_ptr() 277 let res = unsafe { hcidevup(file.as_raw_fd(), 0) }; in test_ioctl_write_int() 287 let res = unsafe { g_audio(file.as_raw_fd(), &mut data) }; in test_ioctl_read() 297 let res = unsafe { enum_audio(file.as_raw_fd(), &mut data) }; in test_ioctl_readwrite() 328 let res = unsafe { spi_ioc_message(file.as_raw_fd(), in test_ioctl_write_buf() [all...] |
H A D | test_aio.rs | 82 f.as_raw_fd(), in error() 97 let fd = f.as_raw_fd(); in ok() 145 let fd = f.as_raw_fd(); in cancel() 169 f.as_raw_fd(), in error() 189 let fd = f.as_raw_fd(); in ok() 216 let fd = f.as_raw_fd(); in on_stack() 275 let fd = f.as_raw_fd(); in ok() 332 f.as_raw_fd(), in cancel() 362 f.as_raw_fd(), in ok() 392 f.as_raw_fd(), in on_stack() [all...] |
H A D | test_stat.rs | 16 fstat(f.as_raw_fd()).unwrap().st_flags.into(), in test_chflags() 25 fstat(f.as_raw_fd()).unwrap().st_flags.into(), in test_chflags()
|
H A D | test_uio.rs | 114 assert_eq!(Ok(8), pwrite(file.as_raw_fd(), &buf, 8)); in test_pwrite() 140 assert_eq!(Ok(16), pread(file.as_raw_fd(), &mut buf, 16)); in test_pread() 171 let written = pwritev(file.as_raw_fd(), &iovecs, 100).ok().unwrap(); in test_pwritev() 209 assert_eq!(Ok(100), preadv(file.as_raw_fd(), &mut iovecs, 100)); in test_preadv()
|
/third_party/rust/crates/rustix/src/backend/libc/io/ |
H A D | epoll.rs | 32 //! let raw_listen_sock = listen_sock.as_fd().as_raw_fd(); 42 //! if target.as_raw_fd() == raw_listen_sock { 157 let raw_fd = target.as_fd().as_raw_fd(); in add() 160 self.epoll_fd.as_fd().as_raw_fd(), in add() 182 let raw_fd = target.as_fd().as_raw_fd(); in mod_() 188 self.epoll_fd.as_fd().as_raw_fd(), in mod_() 208 let raw_fd = target.as_fd().as_raw_fd(); in del() 210 self.epoll_fd.as_fd().as_raw_fd(), in del() 235 self.epoll_fd.as_fd().as_raw_fd(), in wait() 250 fn as_raw_fd( functions [all...] |
/third_party/rust/crates/io-lifetimes/src/ |
H A D | impls_std.rs | 24 unsafe { BorrowedFd::borrow_raw(self.as_raw_fd()) } in as_fd() 48 unsafe { BorrowedFd::borrow_raw(self.as_raw_fd()) } in as_fd() 136 unsafe { BorrowedFd::borrow_raw(self.as_raw_fd()) } in as_fd() 216 unsafe { BorrowedFd::borrow_raw(self.as_raw_fd()) } in as_fd() 296 unsafe { BorrowedFd::borrow_raw(self.as_raw_fd()) } in as_fd() 376 unsafe { BorrowedFd::borrow_raw(self.as_raw_fd()) } in as_fd() 456 unsafe { BorrowedFd::borrow_raw(self.as_raw_fd()) } in as_fd() 472 unsafe { BorrowedFd::borrow_raw(self.as_raw_fd()) } in as_fd() 488 unsafe { BorrowedFd::borrow_raw(self.as_raw_fd()) } in as_fd() 504 unsafe { BorrowedFd::borrow_raw(self.as_raw_fd()) } in as_fd() [all...] |
H A D | impls_tokio.rs | 20 unsafe { BorrowedFd::borrow_raw(self.as_raw_fd()) } in as_fd() 68 unsafe { BorrowedFd::borrow_raw(self.as_raw_fd()) } in as_fd() 84 unsafe { BorrowedFd::borrow_raw(self.as_raw_fd()) } in as_fd() 100 unsafe { BorrowedFd::borrow_raw(self.as_raw_fd()) } in as_fd() 116 unsafe { BorrowedFd::borrow_raw(self.as_raw_fd()) } in as_fd() 132 unsafe { BorrowedFd::borrow_raw(self.as_raw_fd()) } in as_fd() 148 unsafe { BorrowedFd::borrow_raw(self.as_raw_fd()) } in as_fd() 164 unsafe { BorrowedFd::borrow_raw(self.as_raw_fd()) } in as_fd() 172 unsafe { BorrowedFd::borrow_raw(self.as_raw_fd()) } in as_fd() 180 unsafe { BorrowedFd::borrow_raw(self.as_raw_fd()) } in as_fd() [all...] |
H A D | raw.rs | 59 self.as_raw_fd() in as_raw_filelike() 91 self.as_raw_fd() in as_raw_socketlike()
|
/third_party/rust/crates/rustix/src/backend/linux_raw/io/ |
H A D | epoll.rs | 32 //! let raw_listen_sock = listen_sock.as_fd().as_raw_fd(); 42 //! if target.as_raw_fd() == raw_listen_sock { 155 let raw_fd = target.as_fd().as_raw_fd(); in add() 179 let raw_fd = target.as_fd().as_raw_fd(); in mod_() 204 let raw_fd = target.as_fd().as_raw_fd(); in del() 241 fn as_raw_fd(&self) -> RawFd { in as_raw_fd() functions 242 self.epoll_fd.as_raw_fd() in as_raw_fd()
|
/third_party/rust/crates/nix/src/ |
H A D | pty.rs | 53 fn as_raw_fd(&self) -> RawFd { in as_raw_fd() functions 119 if unsafe { libc::grantpt(fd.as_raw_fd()) } < 0 { in grantpt() 188 let name_ptr = libc::ptsname(fd.as_raw_fd()); in ptsname() 214 if libc::ptsname_r(fd.as_raw_fd(), name_buf_ptr, cap) != 0 { in ptsname_r() 232 if unsafe { libc::unlockpt(fd.as_raw_fd()) } < 0 { in unlockpt()
|
H A D | dir.rs | 90 fn as_raw_fd(&self) -> RawFd { in as_raw_fd() functions 161 fn as_raw_fd(&self) -> RawFd { in as_raw_fd() functions 162 self.0.as_raw_fd() in as_raw_fd()
|
/third_party/rust/crates/rustix/src/backend/libc/ |
H A D | io_lifetimes.rs | 18 /// A version of [`as_raw_fd`] for use with Winsock2 API. 20 /// [`as_raw_fd`]: https://doc.rust-lang.org/stable/std/os/unix/io/trait.FromRawFd.html#tymethod.as_raw_fd 21 fn as_raw_fd(&self) -> RawFd; in as_raw_fd() functions 26 fn as_raw_fd(&self) -> RawFd { in as_raw_fd() functions
|
/third_party/rust/crates/rustix/src/io/fd/ |
H A D | raw.rs | 47 /// let raw_fd: RawFd = f.as_raw_fd(); 51 fn as_raw_fd(&self) -> RawFd; in as_raw_fd() functions 136 fn as_raw_fd(&self) -> RawFd { in as_raw_fd() functions
|
/third_party/rust/crates/rustix/tests/fs/ |
H A D | openat2.rs | 89 &format!("/proc/self/fd/{}", test.as_fd().as_raw_fd()), in test_openat2() 97 &format!("/proc/self/fd/{}", test.as_fd().as_raw_fd()), in test_openat2() 105 &format!("/proc/self/fd/{}", test.as_fd().as_raw_fd()), in test_openat2()
|
H A D | fcntl.rs | 16 assert_eq!(new.as_fd().as_raw_fd(), 700); in test_fcntl_dupfd_cloexec()
|
/third_party/rust/crates/rustix/src/io/ |
H A D | context.rs | 92 target.as_raw_fd() as u64 in encode() 147 target.as_fd().as_raw_fd() as u64 in acquire() 160 let raw_fd = target.consume().as_raw_fd(); in release()
|