Page MenuHomeFreeBSD

D21092.id60204.diff
No OneTemporary

D21092.id60204.diff

Index: sys/compat/freebsd32/freebsd32_misc.c
===================================================================
--- sys/compat/freebsd32/freebsd32_misc.c
+++ sys/compat/freebsd32/freebsd32_misc.c
@@ -3482,3 +3482,32 @@
}
return (error);
}
+
+int
+freebsd32_copy_file_range(struct thread *td,
+ struct freebsd32_copy_file_range_args *uap)
+{
+ off_t inoff, outoff, *inoffp, *outoffp;
+ int error;
+
+ inoffp = outoffp = NULL;
+ if (uap->inoffp != NULL) {
+ error = copyin(uap->inoffp, &inoff, sizeof(off_t));
+ if (error != 0)
+ return (error);
+ inoffp = &inoff;
+ }
+ if (uap->outoffp != NULL) {
+ error = copyin(uap->outoffp, &outoff, sizeof(off_t));
+ if (error != 0)
+ return (error);
+ outoffp = &outoff;
+ }
+ error = kern_copy_file_range(td, uap->infd, inoffp, uap->outfd,
+ outoffp, uap->len, uap->flags);
+ if (error == 0 && uap->inoffp != NULL)
+ error = copyout(inoffp, uap->inoffp, sizeof(off_t));
+ if (error == 0 && uap->outoffp != NULL)
+ error = copyout(outoffp, uap->outoffp, sizeof(off_t));
+ return (error);
+}
Index: sys/compat/freebsd32/syscalls.master
===================================================================
--- sys/compat/freebsd32/syscalls.master
+++ sys/compat/freebsd32/syscalls.master
@@ -1147,5 +1147,8 @@
size_t bufsize); }
568 AUE_UNLINKAT NOPROTO { int funlinkat(int dfd, const char *path, int fd, \
int flag); }
+569 AUE_NULL STD { int freebsd32_copy_file_range(int infd, \
+ off_t *inoffp, int outfd, off_t *outoffp, \
+ uint32_t len, unsigned int flags); }
; vim: syntax=off

File Metadata

Mime Type
text/plain
Expires
Mon, Aug 31, 11:35 PM (7 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37731513
Default Alt Text
D21092.id60204.diff (1 KB)

Event Timeline