mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
Auto-commit fs_open_fd.cpp
This commit is contained in:
parent
925b9eed9f
commit
ee753f28ca
1 changed files with 2 additions and 4 deletions
|
|
@ -28,14 +28,12 @@ int
|
|||
fs::open_fd(const int fd_,
|
||||
const int flags_)
|
||||
{
|
||||
const int proc_fd = procfs::PROC_SELF_FD_FD.load();
|
||||
|
||||
if(proc_fd <= 0)
|
||||
if(procfs::PROC_SELF_FD_FD <= 0)
|
||||
fatal::abort("procfs::PROC_SELF_FD_FD must be > 0");
|
||||
|
||||
const int flags = (flags_ & ~O_NOFOLLOW);
|
||||
|
||||
return fs::openat(proc_fd,
|
||||
return fs::openat(procfs::PROC_SELF_FD_FD,
|
||||
fmt::format("{}",fd_),
|
||||
flags);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue