diff options
author | luigi <luigi@FreeBSD.org> | 2002-03-11 06:50:28 +0000 |
---|---|---|
committer | luigi <luigi@FreeBSD.org> | 2002-03-11 06:50:28 +0000 |
commit | 610055212c343cfa7aa9e25b2c03784e245d68e2 (patch) | |
tree | 25375ed7fd1944f0c3873042d4d743b8344ebc1e /sbin/sysctl | |
parent | 73dc5cffc75fac6395ea1130cf85480c42114fb3 (diff) | |
download | FreeBSD-src-610055212c343cfa7aa9e25b2c03784e245d68e2.zip FreeBSD-src-610055212c343cfa7aa9e25b2c03784e245d68e2.tar.gz |
Make the handling of machdep.guessed_bootdev compiled on i386 only.
Diffstat (limited to 'sbin/sysctl')
-rw-r--r-- | sbin/sysctl/sysctl.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c index 7d66552..194be81 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') |