diff options
author | jlemon <jlemon@FreeBSD.org> | 2001-02-16 14:42:11 +0000 |
---|---|---|
committer | jlemon <jlemon@FreeBSD.org> | 2001-02-16 14:42:11 +0000 |
commit | 065a73369e7e9928b0d617ca8787a109245552e2 (patch) | |
tree | 27a55687c63b9b43bba2b369cc417272006db376 /sys/compat/linux/linux_misc.c | |
parent | c7ba1f9694fa8b0335305d6b36f179a03a55fee9 (diff) | |
download | FreeBSD-src-065a73369e7e9928b0d617ca8787a109245552e2.zip FreeBSD-src-065a73369e7e9928b0d617ca8787a109245552e2.tar.gz |
Add mount syscall to linux emulation. Also improve emulation of reboot.
Diffstat (limited to 'sys/compat/linux/linux_misc.c')
-rw-r--r-- | sys/compat/linux/linux_misc.c | 20 |
1 files changed, 20 insertions, 0 deletions
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 <sys/imgact_aout.h> #include <sys/mount.h> #include <sys/namei.h> +#include <sys/reboot.h> #include <sys/resourcevar.h> #include <sys/stat.h> #include <sys/sysctl.h> @@ -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)); +} |