aboutsummaryrefslogtreecommitdiff
path: root/sbin/sysctl/sysctl.c
diff options
context:
space:
mode:
authorLuigi Rizzo <luigi@FreeBSD.org>2002-03-11 06:50:28 +0000
committerLuigi Rizzo <luigi@FreeBSD.org>2002-03-11 06:50:28 +0000
commitbca9bbeae7be0f3637084160666645350b8d6912 (patch)
tree25375ed7fd1944f0c3873042d4d743b8344ebc1e /sbin/sysctl/sysctl.c
parent77d49b3cf47ff31e18eb01c76ddd673bc093bf03 (diff)
Notes
Diffstat (limited to 'sbin/sysctl/sysctl.c')
-rw-r--r--sbin/sysctl/sysctl.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c
index 7d66552c0c18..194be815432b 100644
--- a/sbin/sysctl/sysctl.c
+++ b/sbin/sysctl/sysctl.c
@@ -45,10 +45,12 @@ static const char rcsid[] =
"$FreeBSD$";
#endif /* not lint */
+#ifdef __i386__
#include <sys/diskslice.h> /* used for bootdev parsing */
+#include <sys/reboot.h> /* used for bootdev parsing */
+#endif
#include <sys/param.h>
#include <sys/time.h>
-#include <sys/reboot.h> /* used for bootdev parsing */
#include <sys/resource.h>
#include <sys/stat.h>
#include <sys/sysctl.h>
@@ -405,6 +407,7 @@ oidfmt(int *oid, int len, char *fmt, u_int *kind)
return 0;
}
+#ifdef __i386__
/*
* Code to map a bootdev major number into a suitable device name.
* Major numbers are mapped into names as in boot2.c
@@ -451,6 +454,7 @@ machdep_bootdev(u_long value)
majdev, unit, slice, part);
return 0;
}
+#endif
/*
* This formats and outputs the value of one variable
@@ -545,8 +549,10 @@ show_var(int *oid, int nlen)
if (!nflag)
printf("%s%s", name, sep);
fmt++;
+#ifdef __i386__
if (!strcmp(name, "machdep.guessed_bootdev"))
return machdep_bootdev(*(unsigned long *)p);
+#endif
val = "";
while (len >= sizeof(long)) {
if(*fmt == 'U')