Commit 75f6b9bcad for qemu.org
commit 75f6b9bcadd7be140a6f1f49ce89893fb4d2dbe2
Author: Stacey Son <sson@FreeBSD.org>
Date: Mon Feb 2 16:39:46 2026 -0700
bsd-user: Add do_bsd_quotactl, do_bsd_reboot and do_bsd_getdtablesize
Add some trivial misc system calls: stub implementations for quotactl(2)
and reboot(2) syscall; a trivial do_bsd_getdtablesize that calls
getdtablesize(2).
Signed-off-by: Stacey Son <sson@FreeBSD.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Warner Losh <imp@bsdimp.com>
diff --git a/bsd-user/bsd-misc.h b/bsd-user/bsd-misc.h
new file mode 100644
index 0000000000..7587ffd605
--- /dev/null
+++ b/bsd-user/bsd-misc.h
@@ -0,0 +1,41 @@
+/*
+ * miscellaneous BSD system call shims
+ *
+ * Copyright (c) 2013 Stacey D. Son
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#ifndef BSD_MISC_H
+#define BSD_MISC_H
+
+#include <sys/types.h>
+#include <sys/ipc.h>
+#include <sys/msg.h>
+#include <sys/sem.h>
+#include <sys/uuid.h>
+
+#include "qemu-bsd.h"
+
+/* quotactl(2) */
+static inline abi_long do_bsd_quotactl(abi_ulong path, abi_long cmd,
+ __unused abi_ulong target_addr)
+{
+ qemu_log("qemu: Unsupported syscall quotactl()\n");
+ return -TARGET_ENOSYS;
+}
+
+/* reboot(2) */
+static inline abi_long do_bsd_reboot(abi_long how)
+{
+ qemu_log("qemu: Unsupported syscall reboot()\n");
+ return -TARGET_ENOSYS;
+}
+
+/* getdtablesize(2) */
+static inline abi_long do_bsd_getdtablesize(void)
+{
+ return get_errno(getdtablesize());
+}
+
+#endif /* BSD_MISC_H */