Home
last modified time | relevance | path

Searched refs:OFlags (Results 1 – 25 of 34) sorted by relevance

12

/third_party/rust/crates/rustix/tests/fs/
Dopenat2.rs2 use rustix::fs::{cwd, mkdirat, openat, openat2, symlinkat, Mode, OFlags, ResolveFlags};
9 oflags: OFlags, in openat2_more() argument
26 let dir = openat(cwd(), tmp.path(), OFlags::RDONLY, Mode::empty()).unwrap(); in test_openat2()
32 OFlags::RDONLY | OFlags::CLOEXEC, in test_openat2()
45 OFlags::WRONLY | OFlags::CREATE | OFlags::TRUNC | OFlags::CLOEXEC, in test_openat2()
56 OFlags::RDONLY | OFlags::CLOEXEC, in test_openat2()
64 OFlags::RDONLY | OFlags::CLOEXEC, in test_openat2()
72 OFlags::RDONLY | OFlags::CLOEXEC, in test_openat2()
82 OFlags::RDONLY | OFlags::CLOEXEC, in test_openat2()
90 OFlags::RDONLY | OFlags::CLOEXEC, in test_openat2()
[all …]
Dinvalid_offset.rs16 use rustix::fs::{cwd, openat, seek, Mode, OFlags}; in invalid_offset_seek()
18 let dir = openat(cwd(), tmp.path(), OFlags::RDONLY, Mode::empty()).unwrap(); in invalid_offset_seek()
22 OFlags::WRONLY | OFlags::TRUNC | OFlags::CREATE, in invalid_offset_seek()
45 use rustix::fs::{cwd, fallocate, openat, FallocateFlags, Mode, OFlags}; in invalid_offset_fallocate()
47 let dir = openat(cwd(), tmp.path(), OFlags::RDONLY, Mode::empty()).unwrap(); in invalid_offset_fallocate()
51 OFlags::WRONLY | OFlags::TRUNC | OFlags::CREATE, in invalid_offset_fallocate()
75 use rustix::fs::{cwd, fadvise, openat, Advice, Mode, OFlags}; in invalid_offset_fadvise()
77 let dir = openat(cwd(), tmp.path(), OFlags::RDONLY, Mode::empty()).unwrap(); in invalid_offset_fadvise()
81 OFlags::WRONLY | OFlags::TRUNC | OFlags::CREATE, in invalid_offset_fadvise()
106 use rustix::fs::{cwd, openat, Mode, OFlags}; in invalid_offset_pread()
[all …]
Drenameat.rs12 use rustix::fs::{cwd, openat, renameat, statat, AtFlags, Mode, OFlags}; in test_renameat()
18 OFlags::RDONLY | OFlags::PATH, in test_renameat()
23 let _ = openat(&dir, "foo", OFlags::CREATE | OFlags::WRONLY, Mode::empty()).unwrap(); in test_renameat()
35 use rustix::fs::{cwd, openat, renameat, statat, AtFlags, Mode, OFlags}; in test_renameat_overwrite()
41 OFlags::RDONLY | OFlags::PATH, in test_renameat_overwrite()
46 let _ = openat(&dir, "foo", OFlags::CREATE | OFlags::WRONLY, Mode::empty()).unwrap(); in test_renameat_overwrite()
47 let _ = openat(&dir, "bar", OFlags::CREATE | OFlags::WRONLY, Mode::empty()).unwrap(); in test_renameat_overwrite()
57 use rustix::fs::{cwd, openat, renameat_with, statat, AtFlags, Mode, OFlags, RenameFlags}; in test_renameat_with()
63 OFlags::RDONLY | OFlags::PATH, in test_renameat_with()
68 let _ = openat(&dir, "foo", OFlags::CREATE | OFlags::WRONLY, Mode::empty()).unwrap(); in test_renameat_with()
[all …]
Dutimensat.rs4 use rustix::fs::{cwd, openat, statat, utimensat, AtFlags, Mode, OFlags, Timespec, Timestamps}; in test_utimensat()
10 OFlags::RDONLY | OFlags::CLOEXEC, in test_utimensat()
18 OFlags::CREATE | OFlags::WRONLY | OFlags::CLOEXEC, in test_utimensat()
64 use rustix::fs::{cwd, openat, utimensat, AtFlags, Mode, OFlags, Timespec, Timestamps}; in test_utimensat_noent()
70 OFlags::RDONLY | OFlags::CLOEXEC, in test_utimensat_noent()
94 use rustix::fs::{cwd, openat, utimensat, AtFlags, Mode, OFlags, Timespec, Timestamps}; in test_utimensat_notdir()
100 OFlags::RDONLY | OFlags::CLOEXEC, in test_utimensat_notdir()
108 OFlags::CREATE | OFlags::WRONLY | OFlags::CLOEXEC, in test_utimensat_notdir()
Dopenat.rs3 use rustix::fs::{cwd, openat, Mode, OFlags};
12 OFlags::RDONLY | OFlags::CLOEXEC, in test_openat_tmpfile()
19 OFlags::WRONLY | OFlags::CLOEXEC | OFlags::TMPFILE, in test_openat_tmpfile()
Dflock.rs4 use rustix::fs::{cwd, flock, openat, FlockOperation, Mode, OFlags}; in test_flock()
6 let f = openat(cwd(), "Cargo.toml", OFlags::RDONLY, Mode::empty()).unwrap(); in test_flock()
9 let g = openat(cwd(), "Cargo.toml", OFlags::RDONLY, Mode::empty()).unwrap(); in test_flock()
15 let f = openat(cwd(), "Cargo.toml", OFlags::RDONLY, Mode::empty()).unwrap(); in test_flock()
17 let g = openat(cwd(), "Cargo.toml", OFlags::RDONLY, Mode::empty()).unwrap(); in test_flock()
24 let f = openat(cwd(), "Cargo.toml", OFlags::RDONLY, Mode::empty()).unwrap(); in test_flock()
28 let g = openat(cwd(), "Cargo.toml", OFlags::RDONLY, Mode::empty()).unwrap(); in test_flock()
Dy2038.rs11 cwd, fstat, openat, statat, utimensat, AtFlags, Mode, OFlags, Timespec, Timestamps, in test_y2038_with_utimensat()
16 let dir = openat(&cwd(), tmp.path(), OFlags::RDONLY, Mode::empty()).unwrap(); in test_y2038_with_utimensat()
33 let _ = openat(&dir, "foo", OFlags::CREATE | OFlags::WRONLY, Mode::RUSR).unwrap(); in test_y2038_with_utimensat()
73 let file = openat(&dir, "foo", OFlags::RDONLY, Mode::empty()).unwrap(); in test_y2038_with_utimensat()
110 cwd, fstat, futimens, openat, statat, AtFlags, Mode, OFlags, Timespec, Timestamps, in test_y2038_with_futimens()
115 let dir = openat(&cwd(), tmp.path(), OFlags::RDONLY, Mode::empty()).unwrap(); in test_y2038_with_futimens()
132 let file = openat(&dir, "foo", OFlags::CREATE | OFlags::WRONLY, Mode::RUSR).unwrap(); in test_y2038_with_futimens()
169 let file = openat(&dir, "foo", OFlags::RDONLY, Mode::empty()).unwrap(); in test_y2038_with_futimens()
Dfutimens.rs4 use rustix::fs::{cwd, fstat, futimens, openat, Mode, OFlags, Timespec, Timestamps}; in test_futimens()
7 let dir = openat(cwd(), tmp.path(), OFlags::RDONLY, Mode::empty()).unwrap(); in test_futimens()
12 OFlags::CREATE | OFlags::WRONLY | OFlags::CLOEXEC, in test_futimens()
Dmkdirat.rs4 use rustix::fs::{cwd, mkdirat, openat, statat, unlinkat, AtFlags, FileType, Mode, OFlags}; in test_mkdirat()
7 let dir = openat(cwd(), tmp.path(), OFlags::RDONLY, Mode::empty()).unwrap(); in test_mkdirat()
18 use rustix::fs::{cwd, mkdirat, openat, statat, unlinkat, AtFlags, FileType, Mode, OFlags}; in test_mkdirat_with_o_path()
24 OFlags::RDONLY | OFlags::PATH, in test_mkdirat_with_o_path()
Dlong_paths.rs4 use rustix::fs::{cwd, mkdirat, openat, Mode, OFlags}; in test_long_paths()
7 let dir = openat(cwd(), tmp.path(), OFlags::RDONLY, Mode::empty()).unwrap(); in test_long_paths()
26 let _ = openat(&dir, &long_path, OFlags::RDONLY, Mode::empty()).unwrap(); in test_long_paths()
27 let _ = openat(&dir, &too_long_path, OFlags::RDONLY, Mode::empty()).unwrap_err(); in test_long_paths()
Ddir.rs6 rustix::fs::OFlags::RDONLY | rustix::fs::OFlags::CLOEXEC, in test_dir()
16 rustix::fs::OFlags::RDONLY | rustix::fs::OFlags::CLOEXEC, in test_dir()
Dfile.rs17 rustix::fs::OFlags::RDONLY, in test_file()
27 rustix::fs::OFlags::RDONLY, in test_file()
36 rustix::fs::OFlags::RDONLY, in test_file()
62 rustix::fs::OFlags::empty() in test_file()
Dmknodat.rs9 use rustix::fs::{cwd, mknodat, openat, statat, unlinkat, AtFlags, FileType, Mode, OFlags}; in test_mknodat()
12 let dir = openat(cwd(), tmp.path(), OFlags::RDONLY, Mode::empty()).unwrap(); in test_mknodat()
Dfcntl.rs10 rustix::fs::OFlags::RDONLY, in test_fcntl_dupfd_cloexec()
/third_party/rust/crates/rustix/tests/io/
Dread_write.rs9 use rustix::fs::{cwd, openat, Mode, OFlags}; in test_readwrite_pv()
13 let dir = openat(cwd(), tmp.path(), OFlags::RDONLY, Mode::empty()).unwrap(); in test_readwrite_pv()
17 OFlags::RDWR | OFlags::CREATE | OFlags::TRUNC, in test_readwrite_pv()
47 use rustix::fs::{cwd, openat, Mode, OFlags}; in test_readwrite_p()
51 let dir = openat(cwd(), tmp.path(), OFlags::RDONLY, Mode::empty()).unwrap(); in test_readwrite_p()
55 OFlags::RDWR | OFlags::CREATE | OFlags::TRUNC, in test_readwrite_p()
72 use rustix::fs::{cwd, openat, seek, Mode, OFlags}; in test_readwrite_v()
76 let dir = openat(cwd(), tmp.path(), OFlags::RDONLY, Mode::empty()).unwrap(); in test_readwrite_v()
80 OFlags::RDWR | OFlags::CREATE | OFlags::TRUNC, in test_readwrite_v()
98 use rustix::fs::{cwd, openat, seek, Mode, OFlags}; in test_readwrite()
[all …]
/third_party/rust/crates/rustix/tests/mm/
Dmmap.rs7 use rustix::fs::{cwd, openat, Mode, OFlags}; in test_mmap()
14 let dir = openat(cwd(), tmp.path(), OFlags::RDONLY, Mode::empty()).unwrap(); in test_mmap()
19 OFlags::CREATE | OFlags::WRONLY | OFlags::TRUNC, in test_mmap()
26 let file = openat(&dir, "foo", OFlags::RDONLY, Mode::empty()).unwrap(); in test_mmap()
43 let file = openat(&dir, "foo", OFlags::RDONLY, Mode::empty()).unwrap(); in test_mmap()
/third_party/rust/crates/rustix/src/io/
Dprocfs.rs22 cwd, fstat, fstatfs, major, openat, renameat, Dir, FileType, Mode, OFlags, Stat,
200 let oflags = OFlags::NOFOLLOW | OFlags::DIRECTORY | OFlags::CLOEXEC | OFlags::NOCTTY; in proc_opendirat()
412 let oflags = OFlags::RDONLY | OFlags::CLOEXEC | OFlags::NOFOLLOW | OFlags::NOCTTY; in open_and_check_file()
/third_party/rust/crates/rustix/src/fs/
Dfcntl.rs8 use backend::fs::types::OFlags;
27 pub fn fcntl_getfl<Fd: AsFd>(fd: Fd) -> io::Result<OFlags> { in fcntl_getfl() argument
41 pub fn fcntl_setfl<Fd: AsFd>(fd: Fd, flags: OFlags) -> io::Result<()> { in fcntl_setfl()
Dfd.rs274 if mode.contains(crate::fs::OFlags::PATH) { in _is_file_read_write()
280 match mode & crate::fs::OFlags::RWMODE { in _is_file_read_write()
281 crate::fs::OFlags::RDONLY => Ok((true, false)), in _is_file_read_write()
282 crate::fs::OFlags::RDWR => Ok((true, true)), in _is_file_read_write()
283 crate::fs::OFlags::WRONLY => Ok((false, true)), in _is_file_read_write()
Dopenat2.rs4 use backend::fs::types::{Mode, OFlags, ResolveFlags};
16 oflags: OFlags, in openat2() argument
Dconstants.rs6 pub use backend::fs::types::{Access, Mode, OFlags};
/third_party/rust/crates/rustix/tests/process/
Dworking_directory.rs4 use rustix::fs::{Mode, OFlags};
22 let orig_fd_cwd = rustix::fs::openat(rustix::fs::cwd(), ".", OFlags::RDONLY, Mode::empty()) in test_changing_working_directory()
/third_party/rust/crates/rustix/src/backend/linux_raw/
Dconv.rs36 use crate::fs::{FileType, Mode, OFlags};
470 fn oflags_bits(oflags: OFlags) -> c::c_uint { in oflags_bits()
474 if !oflags.contains(OFlags::PATH) { in oflags_bits()
483 const fn oflags_bits(oflags: OFlags) -> c::c_uint { in oflags_bits()
488 impl<'a, Num: ArgNumber> From<OFlags> for ArgReg<'a, Num> {
490 fn from(oflags: OFlags) -> Self { in from()
498 pub(super) fn oflags_for_open_how(oflags: OFlags) -> u64 { in oflags_for_open_how()
/third_party/rust/crates/rustix/src/backend/linux_raw/fs/
Dsyscalls.rs27 Access, Advice, AtFlags, FallocateFlags, FileType, FlockOperation, MemfdFlags, Mode, OFlags,
50 pub(crate) fn open(filename: &CStr, flags: OFlags, mode: Mode) -> io::Result<OwnedFd> { in open() argument
75 flags: OFlags, in openat() argument
92 flags: OFlags, in openat2() argument
888 pub(crate) fn fcntl_getfl(fd: BorrowedFd<'_>) -> io::Result<OFlags> { in fcntl_getfl() argument
892 .map(OFlags::from_bits_truncate) in fcntl_getfl()
897 .map(OFlags::from_bits_truncate) in fcntl_getfl()
902 pub(crate) fn fcntl_setfl(fd: BorrowedFd<'_>, flags: OFlags) -> io::Result<()> { in fcntl_setfl()
Ddir.rs4 fcntl_getfl, fstat, fstatfs, fstatvfs, openat, FileType, Mode, OFlags, Stat, StatFs, StatVfs,
36 let fd_for_dir = openat(fd, cstr!("."), flags | OFlags::CLOEXEC, Mode::empty())?; in _read_from()

12