summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2005-04-26 01:09:01 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2005-04-26 01:09:01 +0000
commite6aebd0476238c26bdfe4ac727486be4a321df00 (patch)
treed55ddfcd31ae86f93ce6696f322825810112d844 /sys
parent28f1119182dca85f9aa0102f51813e7790023d04 (diff)
let ramdisks compile after zts changes
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/arm/arm/arm32_machdep.c16
-rw-r--r--sys/arch/zaurus/conf/files.zaurus4
2 files changed, 13 insertions, 7 deletions
diff --git a/sys/arch/arm/arm/arm32_machdep.c b/sys/arch/arm/arm/arm32_machdep.c
index 109522e27c8..06009de6050 100644
--- a/sys/arch/arm/arm/arm32_machdep.c
+++ b/sys/arch/arm/arm/arm32_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: arm32_machdep.c,v 1.11 2005/04/24 18:55:49 uwe Exp $ */
+/* $OpenBSD: arm32_machdep.c,v 1.12 2005/04/26 01:09:00 deraadt Exp $ */
/* $NetBSD: arm32_machdep.c,v 1.42 2003/12/30 12:33:15 pk Exp $ */
/*
@@ -466,23 +466,28 @@ cpu_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p)
return (sysctl_int(oldp, oldlenp, newp, newlen, &cpu_apmwarn));
#endif
#if defined(__zaurus__)
+#include "zts.h"
case CPU_KBDRESET:
if (securelevel > 0)
return (sysctl_rdint(oldp, oldlenp, newp,
kbd_reset));
- else
- return (sysctl_int(oldp, oldlenp, newp, newlen,
- &kbd_reset));
+ return (sysctl_int(oldp, oldlenp, newp, newlen,
+ &kbd_reset));
case CPU_ZTSRAWMODE:
+#if NZTS > 0
return (sysctl_int(oldp, oldlenp, newp, newlen,
&zts_rawmode));
+#else
+ return (EINVAL);
+#endif /* NZTS > 0 */
case CPU_ZTSSCALE:
{
struct ztsscale *p = newp;
struct ztsscale ts;
- int err;
int s;
+#if NZTS > 0
+ int err = EINVAL;
if (!newp && newlen == 0)
return (sysctl_struct(oldp, oldlenp, 0, 0,
@@ -504,6 +509,7 @@ cpu_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p)
zts_scale = ts;
splx(s);
}
+#endif /* NZTS > 0 */
return (err);
}
#endif
diff --git a/sys/arch/zaurus/conf/files.zaurus b/sys/arch/zaurus/conf/files.zaurus
index 6813b3395e9..1d7ea19b8a4 100644
--- a/sys/arch/zaurus/conf/files.zaurus
+++ b/sys/arch/zaurus/conf/files.zaurus
@@ -1,4 +1,4 @@
-# $OpenBSD: files.zaurus,v 1.16 2005/04/15 01:05:50 pascoe Exp $
+# $OpenBSD: files.zaurus,v 1.17 2005/04/26 01:09:00 deraadt Exp $
#
# First try for arm-specific configuration info
#
@@ -50,7 +50,7 @@ file arch/zaurus/dev/zaurus_apm.c apm_pxaip
# Zaurus touchpad
device zts: wsmousedev
attach zts at pxaip
-file arch/zaurus/dev/zts.c zts
+file arch/zaurus/dev/zts.c zts needs-flag
# Zaurus sound
device zaudio: audio