From 065a73369e7e9928b0d617ca8787a109245552e2 Mon Sep 17 00:00:00 2001 From: jlemon Date: Fri, 16 Feb 2001 14:42:11 +0000 Subject: Add mount syscall to linux emulation. Also improve emulation of reboot. --- sys/compat/linux/linux_misc.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'sys/compat/linux/linux_misc.c') diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 822ef8b..552d5f4 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -1145,3 +1146,22 @@ linux_sched_getscheduler(p, uap) return error; } + +#define REBOOT_CAD_ON 0x89abcdef +#define REBOOT_CAD_OFF 0 +#define REBOOT_HALT 0xcdef0123 + +int +linux_reboot(struct proc *p, struct linux_reboot_args *args) +{ + struct reboot_args bsd_args; + +#ifdef DEBUG + if (ldebug(reboot)) + printf(ARGS(reboot, "%p"), args->opt); +#endif + if (args->opt == REBOOT_CAD_ON || args->opt == REBOOT_CAD_OFF) + return (0); + bsd_args.opt = args->opt == REBOOT_HALT ? RB_HALT : 0; + return (reboot(p, &bsd_args)); +} -- cgit v1.1