Changeset View
Changeset View
Standalone View
Standalone View
head/sys/compat/linux/linux_file.c
Show First 20 Lines • Show All 1,760 Lines • ▼ Show 20 Lines | linux_memfd_create(struct thread *td, struct linux_memfd_create_args *args) | ||||
shmflags = SHM_GROW_ON_WRITE; | shmflags = SHM_GROW_ON_WRITE; | ||||
if ((flags & MFD_CLOEXEC) != 0) | if ((flags & MFD_CLOEXEC) != 0) | ||||
oflags |= O_CLOEXEC; | oflags |= O_CLOEXEC; | ||||
if ((flags & MFD_ALLOW_SEALING) != 0) | if ((flags & MFD_ALLOW_SEALING) != 0) | ||||
shmflags |= SHM_ALLOW_SEALING; | shmflags |= SHM_ALLOW_SEALING; | ||||
return (kern_shm_open2(td, SHM_ANON, oflags, 0, shmflags, NULL, | return (kern_shm_open2(td, SHM_ANON, oflags, 0, shmflags, NULL, | ||||
memfd_name)); | memfd_name)); | ||||
} | } | ||||
int | |||||
linux_splice(struct thread *td, struct linux_splice_args *args) | |||||
{ | |||||
linux_msg(td, "syscall splice not really implemented"); | |||||
/* | |||||
* splice(2) is documented to return EINVAL in various circumstances; | |||||
* returning it instead of ENOSYS should hint the caller to use fallback | |||||
* instead. | |||||
*/ | |||||
return (EINVAL); | |||||
} |