Module Name: src
Committed By: skrll
Date: Fri Jan 19 09:04:24 UTC 2018
Modified Files:
src/sys/dev/raidframe: rf_netbsdkintf.c
Log Message:
Fix some ARM kernel builds. ARM abuses compat32 for ABI compatibility and
this means some ioctls overlap.
To generate a diff of this commit:
cvs rdiff -u -r1.353 -r1.354 src/sys/dev/raidframe/rf_netbsdkintf.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/raidframe/rf_netbsdkintf.c
diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.353 src/sys/dev/raidframe/rf_netbsdkintf.c:1.354
--- src/sys/dev/raidframe/rf_netbsdkintf.c:1.353 Thu Jan 18 00:32:49 2018
+++ src/sys/dev/raidframe/rf_netbsdkintf.c Fri Jan 19 09:04:23 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_netbsdkintf.c,v 1.353 2018/01/18 00:32:49 mrg Exp $ */
+/* $NetBSD: rf_netbsdkintf.c,v 1.354 2018/01/19 09:04:23 skrll Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc.
@@ -101,7 +101,7 @@
***********************************************************/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.353 2018/01/18 00:32:49 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.354 2018/01/19 09:04:23 skrll Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@@ -1115,8 +1115,10 @@ raidioctl(dev_t dev, u_long cmd, void *d
case RAIDFRAME_GET_COMPONENT_LABEL80:
#endif
#ifdef COMPAT_NETBSD32
+#ifdef _LP64
case RAIDFRAME_GET_INFO32:
#endif
+#endif
if ((rs->sc_flags & RAIDF_INITED) == 0)
return (ENXIO);
}
@@ -1152,8 +1154,10 @@ raidioctl(dev_t dev, u_long cmd, void *d
/* configure the system */
case RAIDFRAME_CONFIGURE:
#ifdef COMPAT_NETBSD32
+#ifdef _LP64
case RAIDFRAME_CONFIGURE32:
#endif
+#endif
if (raidPtr->valid) {
/* There is a valid RAID set running on this unit! */
@@ -1169,11 +1173,13 @@ raidioctl(dev_t dev, u_long cmd, void *d
return (ENOMEM);
}
#ifdef COMPAT_NETBSD32
+#ifdef _LP64
if (cmd == RAIDFRAME_CONFIGURE32 &&
(l->l_proc->p_flag & PK_32) != 0)
retcode = rf_config_netbsd32(data, k_cfg);
else
#endif
+#endif
{
u_cfg = *((RF_Config_t **) data);
retcode = copyin(u_cfg, k_cfg, sizeof(RF_Config_t));
@@ -1476,8 +1482,10 @@ raidioctl(dev_t dev, u_long cmd, void *d
case RAIDFRAME_GET_INFO:
#ifdef COMPAT_NETBSD32
+#ifdef _LP64
case RAIDFRAME_GET_INFO32:
#endif
+#endif
RF_Malloc(d_cfg, sizeof(RF_DeviceConfig_t),
(RF_DeviceConfig_t *));
if (d_cfg == NULL)
@@ -1485,10 +1493,12 @@ raidioctl(dev_t dev, u_long cmd, void *d
retcode = rf_get_info(raidPtr, d_cfg);
if (retcode == 0) {
#ifdef COMPAT_NETBSD32
+#ifdef _LP64
if (cmd == RAIDFRAME_GET_INFO32)
ucfgp = NETBSD32PTR64(*(netbsd32_pointer_t *)data);
else
#endif
+#endif
ucfgp = *(RF_DeviceConfig_t **)data;
retcode = copyout(d_cfg, ucfgp, sizeof(RF_DeviceConfig_t));
}