The Pedigree Project 0.1
file-handle-syscalls.h
1/* Copyright (c) 2026, Pedigree Developers. */
2#ifndef POSIX_FILE_HANDLE_SYSCALLS_H
3#define POSIX_FILE_HANDLE_SYSCALLS_H
4
5#include "pedigree/kernel/process/Process.h"
6
7#include "PosixSubsystem.h"
8#include "ResolvedPath.h"
9#include "modules/system/vfs/VFS.h"
10
12 public:
13 ResolvedPath pathLease;
15 DescriptorLease descriptor;
16 File* file = nullptr;
17 uint64_t attachmentId = 0;
18
19 bool resolve(int dirfd, const char* path, bool follow, bool allowEmpty,
20 bool nullAsDescriptor = false);
21};
22
23int posix_handle_error(FileHandleStatus status);
24bool posix_effective_root();
25int posix_name_to_handle_at(int dirfd, const char* path, void* handle, int* mountId, int flags);
26int posix_open_by_handle_at(int mountfd, const void* handle, int flags);
27
28#endif
Definition File.h:74