DECL_TEMPLATE(freebsd, sys_getcontext) // 421
DECL_TEMPLATE(freebsd, sys_setcontext) // 422
DECL_TEMPLATE(freebsd, sys_swapcontext) // 423
+
+#if (FREEBSD_VERS >= FREEBSD_14)
+DECL_TEMPLATE(freebsd, sys_freebsd13_swapoff) // 424
+#else
DECL_TEMPLATE(freebsd, sys_swapoff) // 424
+#endif
+
DECL_TEMPLATE(freebsd, sys___acl_get_link) // 425
DECL_TEMPLATE(freebsd, sys___acl_set_link) // 426
DECL_TEMPLATE(freebsd, sys___acl_delete_link) // 427
#endif
+#if (FREEBSD_VERS >= FREEBSD_14)
+
+// unimpl __NR_fspacectl 580
+// unimpl __NR_sched_getcpu 581
+DECL_TEMPLATE(freebsd, __NR_swapoff) // 582
+#endif
+
DECL_TEMPLATE(freebsd, sys_fake_sigreturn)
#endif // PRIV_SYSWRAP_FREEBSD_H
POST_MEM_WRITE( ARG1, sizeof(struct vki_ucontext) );
}
-// @todo PJF In FreeBSD 14 and onwards this is SYS_freebsd13_swapoff
+#if (FREEBSD_VERS >= FREEBSD_14)
+// SYS_freebsd13_swapoff 424
+// int swapoff(const char *special);
+PRE(sys_freebsd13_swapoff)
+{
+ PRINT("sys_freebsd13_swapoff ( %#" FMT_REGWORD "x(%s) )", ARG1,(char *)ARG1);
+ PRE_REG_READ1(int, "swapoff", const char *, special);
+ PRE_MEM_RASCIIZ( "swapoff(special)", ARG1 );
+}
+#else
// SYS_swapoff 424
// int swapoff(const char *special);
PRE(sys_swapoff)
PRE_REG_READ1(int, "swapoff", const char *, special);
PRE_MEM_RASCIIZ( "swapoff(special)", ARG1 );
}
+#endif
// SYS___acl_get_link 425
// int __acl_get_link(const char *path, acl_type_t type, struct acl *aclp);
#endif // (FREEBSD_VERS >= FREEBSD_13_0)
+#if (FREEBSD_VERS >= FREEBSD_14)
+
+// SYS_swapoff 582
+// int swapoff(const char *special, u_int flags);
+PRE(sys_swapoff)
+{
+ PRINT("sys_swapoff ( %#" FMT_REGWORD "x(%s), %" FMT_REGWORD "u )", ARG1,(char *)ARG1, ARG2);
+ PRE_REG_READ2(int, "swapoff", const char *, special, u_int, flags);
+ PRE_MEM_RASCIIZ( "swapoff(special)", ARG1 );
+}
+
+#endif
+
#undef PRE
#undef POST
BSDX_(__NR_setcontext, sys_setcontext), // 422
BSDXY(__NR_swapcontext, sys_swapcontext), // 423
+#if (FREEBSD_VERS >= FREEBSD_14)
+ BSDX_(__NR_freebsd13_swapoff, sys_freebsd13_swapoff), // 424
+#else
BSDX_(__NR_swapoff, sys_swapoff), // 424
+#endif
BSDXY(__NR___acl_get_link, sys___acl_get_link), // 425
BSDX_(__NR___acl_set_link, sys___acl_set_link), // 426
BSDX_(__NR___acl_delete_link, sys___acl_delete_link), // 427
#if (FREEBSD_VERS >= FREEBSD_14)
// unimpl __NR_fspacectl 580
// unimpl __NR_sched_getcpu 581
- // unimpl __NR_swapoff 582
+ BSDX_(__NR_swapoff, sys_swapoff), // 582
#endif
BSDX_(__NR_fake_sigreturn, sys_fake_sigreturn), // 1000, fake sigreturn
GO(SYS_swapcontext, "2s 2m");
SY(SYS_swapcontext, x0+1, x0+2); FAIL;
+#if (FREEBSD_VERS >= FREEBSD_14)
+ /* SYS_freebsd13_swapoff 424 */
+ GO(SYS_freebsd13_swapoff, "1s 1m");
+ SY(SYS_freebsd13_swapoff, x0+1); FAIL;
+#else
/* SYS_swapoff 424 */
GO(SYS_swapoff, "1s 1m");
SY(SYS_swapoff, x0+1); FAIL;
+#endif
/* SYS___acl_get_link 425 */
GO(SYS___acl_get_link, "3s 2m");