diff options
| author | Jonathan Lemon <jlemon@FreeBSD.org> | 2001-02-16 14:42:11 +0000 |
|---|---|---|
| committer | Jonathan Lemon <jlemon@FreeBSD.org> | 2001-02-16 14:42:11 +0000 |
| commit | 705deb78a3cb5aec2a3789bac16061526ce8b34e (patch) | |
| tree | 416c245ca5ba3857c731d2eb936a29689c290896 /sys/compat/linux/linux_misc.c | |
| parent | c3d7bcdfc9ebb7e74c0a38ff26da7272bd4ea9b3 (diff) | |
Notes
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 822ef8b252ddf..552d5f451de5b 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)); +} |
