Changeset View
Changeset View
Standalone View
Standalone View
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"); | |||||
emaste: so consumers handle `EINVAL` from splice but not `ENOSYS`? | |||||
traszAuthorUnsubmitted Done Inline ActionsPrecisely. Well, the one I found: grep. But looking at splice(2) man page, consumers probably need to handle it anyway: with early kernels exactly one of the fds had to be a pipe, later both could be, then there's "EINVAL The target filesystem doesn't support splicing"... trasz: Precisely. Well, the one I found: grep. But looking at splice(2) man page, consumers probably… | |||||
return (EINVAL); | |||||
} |
so consumers handle EINVAL from splice but not ENOSYS?