implement RB_STRING, derived from SunOS, via compat_sunos.

This commit is contained in:
mrg 1996-08-10 00:23:14 +00:00
parent 18393cb155
commit 72bad48e62
2 changed files with 13 additions and 3 deletions

View File

@ -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);
}

View File

@ -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,