freebsd-dev/sys/compat
Ed Schouten 0f85ff377b Add file_open(): the underlying system call of openat().
CloudABI purely operates on file descriptor rights (CAP_*). File
descriptor access modes (O_ACCMODE) are emulated on top of rights.

Instead of accepting the traditional flags argument, file_open() copies
in an fdstat_t object that contains the initial rights the descriptor
should have, but also file descriptor flags that should persist after
opening (APPEND, NONBLOCK, *SYNC). Only flags that don't persist (EXCL,
TRUNC, CREAT, DIRECTORY) are passed in as an argument.

file_open() first converts the rights, the persistent flags and the
non-persistent flags to fflags. It then calls into vn_open(). If
successful, it installs the file descriptor with the requested
rights, trimming off rights that don't apply to the type of
the file that has been opened.

Unlike kern_openat(), this function does not support /dev/fd/*. I can't
think of a reason why we need to support this for CloudABI.

Obtained from:	https://github.com/NuxiNL/freebsd
Differential Revision:	https://reviews.freebsd.org/D3235
2015-08-06 06:47:28 +00:00
..
cloudabi Add file_open(): the underlying system call of openat(). 2015-08-06 06:47:28 +00:00
cloudabi64 Regenerate the system call table. 2015-08-05 13:10:13 +00:00
freebsd32 Regenerate syscalls. 2015-07-11 15:22:11 +00:00
ia32 In preparation for switching linuxulator to the use the native 1:1 2015-05-24 14:51:29 +00:00
linprocfs Add support to the jail framework to be able to mount linsysfs(5) and 2015-07-19 08:52:35 +00:00
linsysfs Add support to the jail framework to be able to mount linsysfs(5) and 2015-07-19 08:52:35 +00:00
linux Allow the creation of kqueues with a restricted set of Capsicum rights. 2015-08-05 07:36:50 +00:00
ndis Create a dedicated function for ensuring that cdir and rdir are populated. 2015-07-11 16:22:48 +00:00
netbsd Remove some more NetBSD compat shims and other unused bits from these 2012-09-10 18:49:49 +00:00
svr4 The si_status field of the siginfo_t, provided by the waitid(2) and 2015-07-18 09:02:50 +00:00
x86bios Pull in r267961 and r267973 again. Fix for issues reported will follow. 2014-06-28 03:56:17 +00:00