diff --git a/sys/kern/kern_xxx.c b/sys/kern/kern_xxx.c index ea3c0b402b59..6b3d5f005d3f 100644 --- a/sys/kern/kern_xxx.c +++ b/sys/kern/kern_xxx.c @@ -1,4 +1,4 @@ -/* $NetBSD: kern_xxx.c,v 1.33 1996/08/09 10:30:23 mrg Exp $ */ +/* $NetBSD: kern_xxx.c,v 1.34 1996/08/10 00:23:17 mrg Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1993 @@ -57,13 +57,22 @@ sys_reboot(p, v, retval) syscallarg(char *) bootstr; } */ *uap = v; int error; + char *bootstr; if ((error = suser(p->p_ucred, &p->p_acflag)) != 0) return (error); + + /* + * Only use the boot string if RB_STRING is set. + */ + if (SCARG(uap, opt) & RB_STRING) + bootstr = SCARG(uap, bootstr); + else + bootstr = NULL; /* * Not all ports use the bootstr currently. */ - boot(SCARG(uap, opt), SCARG(uap, bootstr)); + boot(SCARG(uap, opt), bootstr); return (0); } diff --git a/sys/sys/reboot.h b/sys/sys/reboot.h index d927ec50b876..15d907e44fe8 100644 --- a/sys/sys/reboot.h +++ b/sys/sys/reboot.h @@ -1,4 +1,4 @@ -/* $NetBSD: reboot.h,v 1.10 1996/08/09 10:30:23 mrg Exp $ */ +/* $NetBSD: reboot.h,v 1.11 1996/08/10 00:23:14 mrg Exp $ */ /* * Copyright (c) 1982, 1986, 1988, 1993, 1994 @@ -51,6 +51,7 @@ #define RB_RDONLY 0x080 /* mount root fs read-only */ #define RB_DUMP 0x100 /* dump kernel memory before reboot */ #define RB_MINIROOT 0x200 /* mini-root present in memory at boot time */ +#define RB_STRING 0x400 /* use provided bootstr */ /* * Constants for converting boot-style device number to type,