Home
last modified time | relevance | path

Searched refs:Errno (Results 1 – 25 of 99) sorted by relevance

1234

/external/rust/crates/nix/src/
Dsched.rs1 use crate::{Errno, Result};
8 use crate::errno::Errno;
71 Err(Error::Sys(Errno::EINVAL)) in is_set()
81 Err(Error::Sys(Errno::EINVAL)) in set()
92 Err(Error::Sys(Errno::EINVAL)) in unset()
141 Errno::result(res).map(drop) in sched_setaffinity()
176 Errno::result(res).and(Ok(cpuset)) in sched_getaffinity()
204 Errno::result(res).map(Pid::from_raw) in clone()
210 Errno::result(res).map(drop) in unshare()
216 Errno::result(res).map(drop) in setns()
[all …]
Dunistd.rs5 use crate::errno::{self, Errno};
237 Errno::result(res).map(|res| match res { in fork()
275 Errno::result(res).map(drop) in setpgid()
280 Errno::result(res).map(Pid) in getpgid()
287 Errno::result(unsafe { libc::setsid() }).map(Pid) in setsid()
299 Errno::result(res).map(Pid) in getsid()
311 Errno::result(res).map(Pid) in tcgetpgrp()
321 Errno::result(res).map(drop) in tcsetpgrp()
365 Errno::result(res) in dup()
378 Errno::result(res) in dup2()
[all …]
Derrno.rs46 impl Errno { implementation
55 pub fn from_i32(err: i32) -> Errno { in from_i32() argument
100 impl error::Error for Errno {} implementation
102 impl fmt::Display for Errno { implementation
108 impl From<Errno> for io::Error {
109 fn from(err: Errno) -> Self { in from()
114 fn last() -> Errno { in last()
115 Errno::from_i32(errno()) in last()
118 fn desc(errno: Errno) -> &'static str { in desc()
119 use self::Errno::*; in desc()
[all …]
Dmqueue.rs6 use crate::errno::Errno;
87 Errno::result(res) in mq_open()
95 Errno::result(res).map(drop) in mq_unlink()
103 Errno::result(res).map(drop) in mq_close()
117 Errno::result(res).map(|r| r as usize) in mq_receive()
130 Errno::result(res).map(drop) in mq_send()
139 Errno::result(res).map(|_| unsafe{MqAttr { mq_attr: attr.assume_init() }}) in mq_getattr()
152 Errno::result(res).map(|_| unsafe{ MqAttr { mq_attr: attr.assume_init() }}) in mq_setattr()
Dfcntl.rs1 use crate::errno::Errno;
171 Errno::result(fd) in open()
186 Errno::result(fd) in openat()
206 Errno::result(res).map(drop) in renameat()
244 let len = Errno::result(res)?; in inner_readlink()
266 let len = Errno::result(res)?; in inner_readlink()
276 None => break Err(super::Error::Sys(Errno::ENAMETOOLONG)), in inner_readlink()
401 Errno::result(res) in fcntl()
429 Errno::result(res).map(drop) in flock()
495 Errno::result(ret).map(|r| r as usize) in copy_file_range()
[all …]
Dkmod.rs9 use crate::errno::Errno;
56 Errno::result(res).map(drop) in init_module()
93 Errno::result(res).map(drop) in finit_module()
122 Errno::result(res).map(drop) in delete_module()
Dlib.rs85 use errno::Errno;
99 Sys(Errno),
120 pub fn as_errno(self) -> Option<Errno> { in as_errno() argument
129 pub fn from_errno(errno: Errno) -> Error { in from_errno()
135 Error::Sys(Errno::last()) in last()
140 Error::Sys(Errno::EINVAL) in invalid_argument()
145 impl From<Errno> for Error {
146 fn from(errno: Errno) -> Error { Error::from_errno(errno) } in from()
Dmount.rs3 use crate::errno::Errno;
92 Errno::result(res).map(drop) in mount()
100 Errno::result(res).map(drop) in umount()
108 Errno::result(res).map(drop) in umount2()
Ducontext.rs5 use crate::errno::Errno;
20 Errno::result(res).map(|_| unsafe { in get()
30 Errno::result(res).map(drop) in set()
/external/libcap/psx/
Dpsx_cgo.go39 func Syscall3(syscallnr, arg1, arg2, arg3 uintptr) (uintptr, uintptr, syscall.Errno) {
44 var errno syscall.Errno
46 errno = syscall.Errno(C.__errno_too(-1))
55 …Syscall6(syscallnr, arg1, arg2, arg3, arg4, arg5, arg6 uintptr) (uintptr, uintptr, syscall.Errno) {
60 var errno syscall.Errno
62 errno = syscall.Errno(C.__errno_too(-1))
/external/e2fsprogs/lib/ext2fs/
Dnt_io.c818 OUT unsigned *Errno OPTIONAL in _Ext2OpenDevice()
830 if(ARGUMENT_PRESENT(Errno)) in _Ext2OpenDevice()
831 *Errno = ENOENT; in _Ext2OpenDevice()
856 if(ARGUMENT_PRESENT(Errno)) in _Ext2OpenDevice()
857 *Errno = ENOENT; in _Ext2OpenDevice()
872 if(ARGUMENT_PRESENT(Errno)) in _Ext2OpenDevice()
873 *Errno = _MapNtStatus(Status); in _Ext2OpenDevice()
894 OUT unsigned* Errno in _BlockIo() argument
930 *Errno = 0; in _BlockIo()
934 *Errno = _MapNtStatus(Status); in _BlockIo()
[all …]
/external/rust/crates/nix/src/sys/
Dstat.rs4 use crate::{Result, NixPath, errno::Errno};
51 Errno::result(res).map(drop) in mknod()
87 Errno::result(res)?; in stat()
100 Errno::result(res)?; in lstat()
109 Errno::result(res)?; in fstat()
121 Errno::result(res)?; in fstatat()
134 Errno::result(res).map(drop) in fchmod()
181 Errno::result(res).map(drop) in fchmodat()
200 Errno::result(res).map(drop) in utimes()
225 Errno::result(res).map(drop) in lutimes()
[all …]
Duio.rs5 use crate::errno::Errno;
13 Errno::result(res).map(|r| r as usize) in writev()
19 Errno::result(res).map(|r| r as usize) in readv()
39 Errno::result(res).map(|r| r as usize) in pwritev()
60 Errno::result(res).map(|r| r as usize) in preadv()
69 Errno::result(res).map(|r| r as usize) in pwrite()
78 Errno::result(res).map(|r| r as usize) in pread()
131 Errno::result(res).map(|r| r as usize) in process_vm_writev()
166 Errno::result(res).map(|r| r as usize) in process_vm_readv()
Dmman.rs4 use crate::errno::Errno;
283 Errno::result(libc::mlock(addr, length)).map(drop) in mlock()
294 Errno::result(libc::munlock(addr, length)).map(drop) in munlock()
306 unsafe { Errno::result(libc::mlockall(flags.bits())) }.map(drop) in mlockall()
311 unsafe { Errno::result(libc::munlockall()) }.map(drop) in munlockall()
323 Err(Error::Sys(Errno::last())) in mmap()
347 Err(Error::Sys(Errno::last())) in mremap()
360 Errno::result(libc::munmap(addr, len)).map(drop) in munmap()
370 Errno::result(libc::madvise(addr, length, advise as i32)).map(drop) in madvise()
399 Errno::result(libc::mprotect(addr, length, prot.bits())).map(drop) in mprotect()
[all …]
Dtimerfd.rs33 use crate::{errno::Errno, Error, Result};
171 Errno::result(unsafe { libc::timerfd_create(clockid as i32, flags.bits()) }) in new()
213 Errno::result(unsafe { in set()
229 Errno::result(unsafe { libc::timerfd_gettime(self.fd, timerspec_ptr) }).map(|_| { in get()
244 Errno::result(unsafe { in unset()
262 Error::Sys(Errno::EINTR) => continue, in wait()
277 let result = Errno::result(unsafe { in drop()
280 if let Err(Error::Sys(Errno::EBADF)) = result { in drop()
Depoll.rs2 use crate::errno::Errno;
73 Errno::result(res) in epoll_create()
80 Errno::result(res) in epoll_create1()
89 Err(Error::Sys(Errno::EINVAL)) in epoll_ctl()
98 Errno::result(res).map(drop) in epoll_ctl()
108 Errno::result(res).map(|r| r as usize) in epoll_wait()
Dstatvfs.rs10 use crate::{Result, NixPath, errno::Errno};
126 Errno::clear(); in statvfs()
132 Errno::result(res).map(|_| Statvfs(stat.assume_init())) in statvfs()
139 Errno::clear(); in fstatvfs()
141 Errno::result(libc::fstatvfs(fd.as_raw_fd(), stat.as_mut_ptr())) in fstatvfs()
Dsignalfd.rs21 use crate::errno::Errno;
52 Errno::result(libc::signalfd(fd as libc::c_int, mask.as_ref(), flags.bits())) in signalfd()
103 let res = Errno::result(unsafe { in read_signal()
111 Err(Error::Sys(Errno::EAGAIN)) => Ok(None), in read_signal()
120 if !std::thread::panicking() && e == Err(Error::Sys(Errno::EBADF)) { in drop()
Dreboot.rs4 use crate::errno::Errno;
29 Err(Error::Sys(Errno::last())) in reboot()
44 Errno::result(res).map(drop) in set_cad_enabled()
Dpersonality.rs2 use crate::errno::Errno;
42 Errno::result(res).map(|r| Persona::from_bits_truncate(r)) in get()
69 Errno::result(res).map(|r| Persona::from_bits_truncate(r)) in set()
Dinotify.rs38 use crate::errno::Errno;
122 let res = Errno::result(unsafe { in init()
145 Errno::result(res).map(|wd| WatchDescriptor { wd }) in add_watch()
158 Errno::result(res).map(drop) in rm_watch()
165 Errno::result(res).map(drop) in rm_watch()
Daio.rs25 use crate::errno::Errno;
795 num if num > 0 => Err(Error::from_errno(Errno::from_i32(num))), in error()
808 Errno::result(unsafe { in fsync()
855 Errno::result(unsafe { in read()
880 Errno::result(unsafe { libc::aio_return(p) }) in aio_return()
890 Errno::result(unsafe { in write()
987 Errno::result(unsafe { in aio_suspend()
1102 Errno::result(unsafe { in listio()
1178 Err(Error::Sys(Errno::EAGAIN)) => { in listio_resubmit()
1181 Err(Error::Sys(Errno::EINPROGRESS)) => { in listio_resubmit()
[all …]
/external/rust/crates/nix/src/sys/ptrace/
Dlinux.rs6 use crate::errno::Errno;
179 Errno::clear(); in ptrace_peek()
182 match Errno::result(ret) { in ptrace_peek()
183 Ok(..) | Err(Error::Sys(Errno::UnknownErrno)) => Ok(ret), in ptrace_peek()
213 Errno::result(res).map(drop) in setregs()
228 Errno::result(res)?; in ptrace_get_data()
233Errno::result(libc::ptrace(request as RequestType, libc::pid_t::from(pid), addr, data)).map(|_| 0) in ptrace_other()
244 Errno::result(res).map(drop) in setoptions()
260 Errno::clear(); in setsiginfo()
266 match Errno::result(ret) { in setsiginfo()
/external/rust/crates/nix/test/sys/
Dtest_epoll.rs4 use nix::errno::Errno;
11 assert_eq!(result.unwrap_err(), Error::Sys(Errno::ENOENT)); in test_epoll_errno()
15 assert_eq!(result.unwrap_err(), Error::Sys(Errno::EINVAL)); in test_epoll_errno()
Dtest_lio_listio_resubmit.rs28 Err(Error::Sys(Errno::EINPROGRESS)) => in finish_liocb()
85 while err == Err(Error::Sys(Errno::EIO)) || in test_lio_listio_resubmit()
86 err == Err(Error::Sys(Errno::EAGAIN)) || in test_lio_listio_resubmit()
87 err == Err(Error::Sys(Errno::EINTR)) { in test_lio_listio_resubmit()

1234