Add and document a `kern.rawpartition' sysctl.
This commit is contained in:
parent
1773fd4286
commit
0f77910137
|
@ -1,4 +1,4 @@
|
|||
.\" $NetBSD: sysctl.3,v 1.5 1995/02/25 08:51:47 cgd Exp $
|
||||
.\" $NetBSD: sysctl.3,v 1.6 1995/08/04 18:36:13 thorpej Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
|
@ -254,6 +254,7 @@ information.
|
|||
.It KERN\_POSIX1 integer no
|
||||
.It KERN\_PROC struct proc no
|
||||
.It KERN\_PROF node not applicable
|
||||
.It KERN\_RAWPARTITION integer no
|
||||
.It KERN\_SAVED\_IDS integer no
|
||||
.It KERN\_SECURELVL integer raise only
|
||||
.It KERN\_VDISABLE integer no
|
||||
|
@ -380,6 +381,8 @@ describing destination of calls and their counts.
|
|||
.It Li GPROF_GMONPARAM
|
||||
Structure giving the sizes of the above arrays.
|
||||
.El
|
||||
.It Li KERN_RAWPARTITION
|
||||
The raw partition of a disk (a == 0).
|
||||
.It Li KERN_SAVED_IDS
|
||||
Returns 1 if saved set-group and saved set-user ID is available.
|
||||
.It Li KERN_SECURELVL
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: kern_sysctl.c,v 1.9 1995/06/24 20:34:07 christos Exp $ */
|
||||
/* $NetBSD: kern_sysctl.c,v 1.10 1995/08/04 18:36:11 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1982, 1986, 1989, 1993
|
||||
|
@ -282,6 +282,8 @@ kern_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p)
|
|||
#endif
|
||||
case KERN_MAXPARTITIONS:
|
||||
return (sysctl_rdint(oldp, oldlenp, newp, MAXPARTITIONS));
|
||||
case KERN_RAWPARTITION:
|
||||
return (sysctl_rdint(oldp, oldlenp, newp, RAW_PART));
|
||||
default:
|
||||
return (EOPNOTSUPP);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sysctl.h,v 1.8 1995/03/29 22:10:15 briggs Exp $ */
|
||||
/* $NetBSD: sysctl.h,v 1.9 1995/08/04 18:36:08 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993
|
||||
|
@ -131,7 +131,8 @@ struct ctlname {
|
|||
#define KERN_BOOTTIME 21 /* struct: time kernel was booted */
|
||||
#define KERN_DOMAINNAME 22 /* string: (YP) domainname */
|
||||
#define KERN_MAXPARTITIONS 23 /* int: number of partitions/disk */
|
||||
#define KERN_MAXID 24 /* number of valid kern ids */
|
||||
#define KERN_RAWPARTITION 24 /* int: raw partition number */
|
||||
#define KERN_MAXID 25 /* number of valid kern ids */
|
||||
|
||||
#define CTL_KERN_NAMES { \
|
||||
{ 0, 0 }, \
|
||||
|
@ -158,6 +159,7 @@ struct ctlname {
|
|||
{ "boottime", CTLTYPE_STRUCT }, \
|
||||
{ "domainname", CTLTYPE_STRING }, \
|
||||
{ "maxpartitions", CTLTYPE_INT }, \
|
||||
{ "rawpartition", CTLTYPE_INT }, \
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue