diff --git a/sys/compat/freebsd32/freebsd32_syscall.h b/sys/compat/freebsd32/freebsd32_syscall.h index 695c411fd2c8..8987284530b4 100644 --- a/sys/compat/freebsd32/freebsd32_syscall.h +++ b/sys/compat/freebsd32/freebsd32_syscall.h @@ -495,4 +495,5 @@ #define FREEBSD32_SYS_fhlinkat 566 #define FREEBSD32_SYS_fhreadlink 567 #define FREEBSD32_SYS_funlinkat 568 -#define FREEBSD32_SYS_MAXSYSCALL 569 +#define FREEBSD32_SYS_copy_file_range 569 +#define FREEBSD32_SYS_MAXSYSCALL 570 diff --git a/sys/compat/freebsd32/freebsd32_syscalls.c b/sys/compat/freebsd32/freebsd32_syscalls.c index b6b171a099c3..f4cb29e602cc 100644 --- a/sys/compat/freebsd32/freebsd32_syscalls.c +++ b/sys/compat/freebsd32/freebsd32_syscalls.c @@ -605,4 +605,5 @@ const char *freebsd32_syscallnames[] = { "fhlinkat", /* 566 = fhlinkat */ "fhreadlink", /* 567 = fhreadlink */ "funlinkat", /* 568 = funlinkat */ + "copy_file_range", /* 569 = copy_file_range */ }; diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c index 632840b7aea5..87272c7c015c 100644 --- a/sys/compat/freebsd32/freebsd32_sysent.c +++ b/sys/compat/freebsd32/freebsd32_sysent.c @@ -652,4 +652,5 @@ struct sysent freebsd32_sysent[] = { { AS(fhlinkat_args), (sy_call_t *)sys_fhlinkat, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 566 = fhlinkat */ { AS(fhreadlink_args), (sy_call_t *)sys_fhreadlink, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 567 = fhreadlink */ { AS(funlinkat_args), (sy_call_t *)sys_funlinkat, AUE_UNLINKAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 568 = funlinkat */ + { AS(copy_file_range_args), (sy_call_t *)sys_copy_file_range, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 569 = copy_file_range */ }; diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index c3a8c886a5f1..1d3e4d09e9d0 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -3320,6 +3320,18 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 4; break; } + /* copy_file_range */ + case 569: { + struct copy_file_range_args *p = params; + iarg[0] = p->infd; /* int */ + uarg[1] = (intptr_t) p->inoffp; /* off_t * */ + iarg[2] = p->outfd; /* int */ + uarg[3] = (intptr_t) p->outoffp; /* off_t * */ + uarg[4] = p->len; /* size_t */ + uarg[5] = p->flags; /* unsigned int */ + *n_args = 6; + break; + } default: *n_args = 0; break; @@ -8934,6 +8946,31 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; }; break; + /* copy_file_range */ + case 569: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "userland off_t *"; + break; + case 2: + p = "int"; + break; + case 3: + p = "userland off_t *"; + break; + case 4: + p = "size_t"; + break; + case 5: + p = "unsigned int"; + break; + default: + break; + }; + break; default: break; }; @@ -10808,6 +10845,11 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) if (ndx == 0 || ndx == 1) p = "int"; break; + /* copy_file_range */ + case 569: + if (ndx == 0 || ndx == 1) + p = "ssize_t"; + break; default: break; };