Module Name: src
Committed By: christos
Date: Sun Mar 18 23:22:15 UTC 2018
Modified Files:
src/sys/compat/common: ccd_60.c
Log Message:
- use the conditional from the header file
- fix compilation
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/compat/common/ccd_60.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/compat/common/ccd_60.c
diff -u src/sys/compat/common/ccd_60.c:1.2 src/sys/compat/common/ccd_60.c:1.3
--- src/sys/compat/common/ccd_60.c:1.2 Sun Mar 18 18:48:00 2018
+++ src/sys/compat/common/ccd_60.c Sun Mar 18 19:22:15 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: ccd_60.c,v 1.2 2018/03/18 22:48:00 pgoyette Exp $ */
+/* $NetBSD: ccd_60.c,v 1.3 2018/03/18 23:22:15 christos Exp $ */
/*-
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -26,7 +26,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ccd_60.c,v 1.2 2018/03/18 22:48:00 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ccd_60.c,v 1.3 2018/03/18 23:22:15 christos Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@@ -50,7 +50,7 @@ compat_60_ccdioctl(dev_t dev, u_long cmd
int (*f)(dev_t, u_long, void *, int, struct lwp *))
{
switch (cmd) {
-#if defined(COMPAT_60) && !defined(_LP64)
+#ifdef CCDIOCSET_60
case CCDIOCSET_60: {
int error;
@@ -65,7 +65,7 @@ compat_60_ccdioctl(dev_t dev, u_long cmd
ccio.ccio_ileave = ccio60->ccio_ileave;
ccio.ccio_flags = ccio60->ccio_flags;
ccio.ccio_unit = ccio60->ccio_unit;
- error = (*f)(dev, CCDIOCSET, &ccio, flag, l);
+ int error = (*f)(dev, CCDIOCSET, &ccio, flag, l);
if (!error) {
/* Copy data back, adjust types if necessary */
ccio60->ccio_disks = ccio.ccio_disks;
@@ -87,8 +87,8 @@ compat_60_ccdioctl(dev_t dev, u_long cmd
* ccio_size member not used, so existing struct OK
* drop through to existing non-compat version
*/
- return (*f)(dev, CCDIOCLR, data, flag, l);
-#endif /* COMPAT_60 && !_LP64*/
+ return (*f)(dev, CCDIOCCLR, data, flag, l);
+#endif
default:
return ENOSYS;
}