Home
last modified time | relevance | path

Searched refs:as_raw_fd (Results 1 – 25 of 113) sorted by relevance

12345

/external/minijail/rust/minijail/tests/
Dfork_remap.rs36 for &p in &[0, 1, 2, check_file1.as_raw_fd(), check_file2.as_raw_fd()] { in main()
42 } else if p == check_file2.as_raw_fd() { in main()
48 let dest_fd1: RawFd = check_file2.as_raw_fd(); in main()
49 let dest_fd2: RawFd = check_file1.as_raw_fd(); in main()
56 (check_file1.as_raw_fd(), dest_fd1), // Cross-over. in main()
57 (check_file2.as_raw_fd(), dest_fd2), // Cross-over. in main()
/external/rust/crates/nix/test/sys/
Dtest_ioctl.rs177 let res = unsafe { tiocnxcl(file.as_raw_fd()) }; in test_ioctl_none_bad()
186 let res = unsafe { tcgets(file.as_raw_fd(), &mut termios) }; in test_ioctl_read_bad()
194 let res = unsafe { tcsbrk(file.as_raw_fd(), 0) }; in test_ioctl_write_int_bad()
203 let res = unsafe { tcsets(file.as_raw_fd(), &termios) }; in test_ioctl_write_ptr_bad()
214 let res = unsafe { log_status(file.as_raw_fd()) }; in test_ioctl_none()
233 let res = unsafe { s_audio(file.as_raw_fd(), &data) }; in test_ioctl_write_ptr()
244 let res = unsafe { hcidevup(file.as_raw_fd(), 0) }; in test_ioctl_write_int()
254 let res = unsafe { g_audio(file.as_raw_fd(), &mut data) }; in test_ioctl_read()
264 let res = unsafe { enum_audio(file.as_raw_fd(), &mut data) }; in test_ioctl_readwrite()
290 let res = unsafe { spi_ioc_message(file.as_raw_fd(), &data[..]) }; in test_ioctl_write_buf()
[all …]
Dtest_aio.rs55 let mut aiocb = AioCb::from_slice( f.as_raw_fd(), in test_cancel()
80 let mut aiocb = AioCb::from_slice(f.as_raw_fd(), in test_aio_cancel_all()
90 let cancelstat = aio_cancel_all(f.as_raw_fd()); in test_aio_cancel_all()
104 let mut aiocb = AioCb::from_fd( f.as_raw_fd(), in test_fsync()
127 let mut aiocb = AioCb::from_fd( f.as_raw_fd(), in test_fsync_error()
152 let mut wcb = AioCb::from_slice( f.as_raw_fd(), in test_aio_suspend()
159 let mut rcb = AioCb::from_mut_slice( f.as_raw_fd(), in test_aio_suspend()
198 let mut aiocb = AioCb::from_mut_slice( f.as_raw_fd(), in test_read()
225 let mut aiocb = AioCb::from_mut_slice( f.as_raw_fd(), in test_read_error()
244 let mut aiocb = AioCb::from_mut_slice( f.as_raw_fd(), in test_read_into_mut_slice()
[all …]
/external/crosvm/sys_util/src/
Dsock_ctrl_msg.rs344 self.as_raw_fd() in socket_fd()
350 self.as_raw_fd() in socket_fd()
356 self.as_raw_fd() in socket_fd()
512 .send_with_fd(&[ioslice], evt.as_raw_fd()) in send_recv_only_fd()
522 assert!(file.as_raw_fd() >= 0); in send_recv_only_fd()
523 assert_ne!(file.as_raw_fd(), s1.as_raw_fd()); in send_recv_only_fd()
524 assert_ne!(file.as_raw_fd(), s2.as_raw_fd()); in send_recv_only_fd()
525 assert_ne!(file.as_raw_fd(), evt.as_raw_fd()); in send_recv_only_fd()
540 .send_with_fds(&[ioslice], &[evt.as_raw_fd()]) in send_recv_with_fd()
555 assert_ne!(files[0], s1.as_raw_fd()); in send_recv_with_fd()
[all …]
Ddescriptor.rs44 let ret = unsafe { libc::fcntl(fd.as_raw_fd(), libc::F_DUPFD_CLOEXEC, 0) }; in clone_fd()
114 fn as_raw_fd(&self) -> RawFd { in as_raw_fd() method
172 fn as_raw_fd(&self) -> RawFd { in as_raw_fd() method
192 self.as_raw_fd()
232 self.as_raw_fd() in as_raw_descriptor()
238 self.as_raw_fd() in as_raw_descriptor()
244 self.as_raw_fd() in as_raw_descriptor()
Dtimerfd.rs62 let ret = unsafe { timerfd_settime(self.as_raw_fd(), 0, &spec, ptr::null_mut()) }; in reset()
79 self.as_raw_fd(), in wait()
99 let ret = unsafe { timerfd_gettime(self.as_raw_fd(), &mut spec) }; in is_armed()
113 let ret = unsafe { timerfd_settime(self.as_raw_fd(), 0, &spec, ptr::null_mut()) }; in clear()
138 fn as_raw_fd(&self) -> RawFd { in as_raw_fd() method
139 self.0.as_raw_fd() in as_raw_fd()
235 fn as_raw_fd(&self) -> RawFd { in as_raw_fd() method
236 self.fd.as_raw_fd() in as_raw_fd()
Dshm.rs157 let ret = unsafe { fcntl(self.fd.as_raw_fd(), F_GET_SEALS) }; in get_seals()
169 let ret = unsafe { fcntl(self.fd.as_raw_fd(), F_ADD_SEALS, seals) }; in add_seals()
189 let ret = unsafe { ftruncate64(self.fd.as_raw_fd(), size as off64_t) }; in set_size()
203 let fd_path = format!("/proc/self/fd/{}", self.as_raw_fd()); in read_name()
261 fn as_raw_fd(&self) -> RawFd { in as_raw_fd() method
262 self.fd.as_raw_fd() in as_raw_fd()
267 fn as_raw_fd(&self) -> RawFd { in as_raw_fd() method
268 self.fd.as_raw_fd() in as_raw_fd()
Dfile_traits.rs284 self.as_raw_fd(),
310 self.as_raw_fd(),
330 self.as_raw_fd(),
356 self.as_raw_fd(),
384 self.as_raw_fd(),
413 self.as_raw_fd(),
435 self.as_raw_fd(),
464 self.as_raw_fd(),
493 vec![self.as_raw_fd()] in as_raw_fds()
Dioctl.rs153 libc::ioctl(fd.as_raw_fd(), nr, 0) in ioctl()
158 libc::ioctl(fd.as_raw_fd(), nr, arg) in ioctl_with_val()
163 libc::ioctl(fd.as_raw_fd(), nr, arg as *const T as *const c_void) in ioctl_with_ref()
168 libc::ioctl(fd.as_raw_fd(), nr, arg as *mut T as *mut c_void) in ioctl_with_mut_ref()
173 libc::ioctl(fd.as_raw_fd(), nr, arg as *const c_void) in ioctl_with_ptr()
178 libc::ioctl(fd.as_raw_fd(), nr, arg as *mut c_void) in ioctl_with_mut_ptr()
Dpoll.rs366 self.epoll_ctx.as_raw_fd(), in add_fd_with_events()
368 fd.as_raw_fd(), in add_fd_with_events()
389 self.epoll_ctx.as_raw_fd(), in modify()
391 fd.as_raw_fd(), in modify()
412 self.epoll_ctx.as_raw_fd(), in delete()
414 fd.as_raw_fd(), in delete()
465 self.epoll_ctx.as_raw_fd(), in wait_timeout()
486 fn as_raw_fd(&self) -> RawFd { in as_raw_fd() method
487 self.epoll_ctx.as_raw_fd() in as_raw_fd()
681 fn as_raw_fd(&self) -> RawFd { in as_raw_fd() method
[all …]
Dvsock.rs336 fn as_raw_fd(&self) -> RawFd { in as_raw_fd() method
380 self.sock.as_raw_fd(), in read()
398 self.sock.as_raw_fd(), in write()
417 fn as_raw_fd(&self) -> RawFd { in as_raw_fd() method
418 self.sock.as_raw_fd() in as_raw_fd()
458 self.sock.as_raw_fd(), in accept()
492 fn as_raw_fd(&self) -> RawFd { in as_raw_fd() method
493 self.sock.as_raw_fd() in as_raw_fd()
Deventfd.rs60 self.as_raw_fd(), in write()
78 self.as_raw_fd(), in read()
144 fn as_raw_fd(&self) -> RawFd { in as_raw_fd() method
145 self.event_handle.as_raw_fd() in as_raw_fd()
/external/rust/crates/vmm_vhost/src/vhost_user/
Dconnection.rs80 fn as_raw_fd(&self) -> RawFd { in as_raw_fd() method
81 self.fd.as_raw_fd() in as_raw_fd()
579 fn as_raw_fd(&self) -> RawFd { in as_raw_fd() method
580 self.sock.as_raw_fd() in as_raw_fd()
623 assert!(listener.as_raw_fd() > 0); in create_listener()
684 .send_slice(&buf1[..], Some(&[fd.as_raw_fd()])) in send_fd()
708 Some(&[fd.as_raw_fd(), fd.as_raw_fd(), fd.as_raw_fd()]), in send_fd()
737 Some(&[fd.as_raw_fd(), fd.as_raw_fd(), fd.as_raw_fd()]), in send_fd()
758 Some(&[fd.as_raw_fd(), fd.as_raw_fd(), fd.as_raw_fd()]), in send_fd()
794 Some(&[fd.as_raw_fd(), fd.as_raw_fd(), fd.as_raw_fd()]), in send_fd()
[all …]
/external/rust/crates/mio/src/
Dpoll.rs363 fn as_raw_fd(&self) -> RawFd { in as_raw_fd() method
364 self.registry.as_raw_fd() in as_raw_fd()
641 fn as_raw_fd(&self) -> RawFd { in as_raw_fd() method
642 self.selector.as_raw_fd() in as_raw_fd()
654 pub fn as_raw_fd() {
656 assert!(poll.as_raw_fd() > 0);
/external/rust/crates/nix/test/
Dtest_pty.rs36 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()
128 assert!(master.as_raw_fd() > 0); in test_open_ptty_pair()
129 assert!(slave.as_raw_fd() > 0); in test_open_ptty_pair()
143 make_raw(slave.as_raw_fd()); in test_read_ptty_pair()
155 make_raw(slave.as_raw_fd()); in test_write_ptty_pair()
Dtest_sendfile.rs26 let res = sendfile(wr, tmp.as_raw_fd(), Some(&mut offset), 2).unwrap(); in test_sendfile_linux()
61 tmp.as_raw_fd(), in test_sendfile_freebsd()
62 wr.as_raw_fd(), in test_sendfile_freebsd()
108 tmp.as_raw_fd(), in test_sendfile_darwin()
109 wr.as_raw_fd(), in test_sendfile_darwin()
/external/rust/crates/tokio/src/process/unix/
Dmod.rs174 fn as_raw_fd(&self) -> RawFd { in as_raw_fd() method
175 self.fd.as_raw_fd() in as_raw_fd()
198 SourceFd(&self.as_raw_fd()).register(registry, token, interest) in register()
207 SourceFd(&self.as_raw_fd()).reregister(registry, token, interest) in reregister()
211 SourceFd(&self.as_raw_fd()).deregister(registry) in deregister()
221 let fd = fd.as_raw_fd(); in set_nonblocking()
/external/rust/crates/mio/src/sys/unix/
Dpipe.rs217 set_nonblocking(self.inner.as_raw_fd(), nonblocking) in set_nonblocking()
292 fn as_raw_fd(&self) -> RawFd { in as_raw_fd() method
293 self.inner.as_raw_fd() in as_raw_fd()
314 set_nonblocking(self.inner.as_raw_fd(), nonblocking) in set_nonblocking()
391 fn as_raw_fd(&self) -> RawFd { in as_raw_fd() method
392 self.inner.as_raw_fd() in as_raw_fd()
/external/libchromeos-rs/src/
Dvsock.rs332 fn as_raw_fd(&self) -> RawFd { in as_raw_fd() method
376 self.sock.as_raw_fd(), in read()
394 self.sock.as_raw_fd(), in write()
413 fn as_raw_fd(&self) -> RawFd { in as_raw_fd() method
414 self.sock.as_raw_fd() in as_raw_fd()
454 self.sock.as_raw_fd(), in accept()
488 fn as_raw_fd(&self) -> RawFd { in as_raw_fd() method
489 self.sock.as_raw_fd() in as_raw_fd()
/external/adhd/cras/client/libcras/src/
Dcras_server_socket.rs115 self.socket.as_raw_fd() in socket_fd()
121 fn as_raw_fd(&self) -> RawFd { in as_raw_fd() method
122 self.socket.as_raw_fd() in as_raw_fd()
/external/rust/crates/mio/src/sys/unix/uds/
Ddatagram.rs29 super::local_addr(socket.as_raw_fd()) in local_addr()
33 super::peer_addr(socket.as_raw_fd()) in peer_addr()
43 socket.as_raw_fd(), in recv_from()
/external/rust/crates/vmm_vhost/src/vhost_kern/
Dvsock.rs74 fn as_raw_fd(&self) -> RawFd { in as_raw_fd() method
75 self.fd.as_raw_fd() in as_raw_fd()
94 assert!(vsock.as_raw_fd() >= 0); in test_vsock_new_device()
161 vsock.set_log_fd(eventfd.as_raw_fd()).unwrap(); in test_vsock_ioctls()
/external/rust/crates/nix/src/
Dpty.rs50 fn as_raw_fd(&self) -> RawFd { in as_raw_fd() method
101 if unsafe { libc::grantpt(fd.as_raw_fd()) } < 0 { in grantpt()
172 let name_ptr = libc::ptsname(fd.as_raw_fd()); in ptsname()
195 if unsafe { libc::ptsname_r(fd.as_raw_fd(), name_buf_ptr, name_buf.capacity()) } != 0 { in ptsname_r()
216 if unsafe { libc::unlockpt(fd.as_raw_fd()) } < 0 { in unlockpt()
/external/crosvm/cros_async/src/
Dpoll_source.rs91 self.as_raw_fd(), in read_to_vec()
129 self.as_raw_fd(), in read_to_mem()
163 self.as_raw_fd(), in read_u64()
196 self.as_raw_fd(), in write_from_vec()
235 self.as_raw_fd(), in write_from_mem()
260 self.as_raw_fd(), in fallocate()
275 let ret = unsafe { libc::fsync(self.as_raw_fd()) }; in fsync()
/external/crosvm/io_uring/src/
During.rs562 io_uring_enter(self.ring_file.as_raw_fd(), added as u64, wait_nr, flags) in enter()
586 io_uring_enter(self.ring_file.as_raw_fd(), 0, wait_nr, flags) in enter()
625 fn as_raw_fd(&self) -> RawFd { in as_raw_fd() method
626 self.ring_file.as_raw_fd() in as_raw_fd()
933 f.as_raw_fd(), in read_parallel()
959 check_one_read(&uring, &mut buf, f.as_raw_fd(), (index % 2) * 0x1000, index); in read_readv()
960 check_one_readv(&uring, &mut buf, f.as_raw_fd(), (index % 2) * 0x1000, index); in read_readv()
989 .add_readv_iter(io_vecs.into_iter(), f.as_raw_fd(), 0, 55) in readv_vec()
1008 .add_write(buf.as_mut_ptr(), buf.len(), f.as_raw_fd(), 0, 55) in write_one_block()
1034 .add_write(buf.as_mut_ptr(), buf.len(), f.as_raw_fd(), 0, 55) in write_one_submit_poll()
[all …]

12345