Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/compat/common - use the conditional from the header file



details:   https://anonhg.NetBSD.org/src/rev/ff672e587fa2
branches:  trunk
changeset: 831265:ff672e587fa2
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Mar 18 23:22:15 2018 +0000

description:
- use the conditional from the header file
- fix compilation

diffstat:

 sys/compat/common/ccd_60.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (47 lines):

diff -r 235fd66536d4 -r ff672e587fa2 sys/compat/common/ccd_60.c
--- a/sys/compat/common/ccd_60.c        Sun Mar 18 22:48:00 2018 +0000
+++ b/sys/compat/common/ccd_60.c        Sun Mar 18 23:22:15 2018 +0000
@@ -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 @@
     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 @@
                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 @@
                 * 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;
        }



Home | Main Index | Thread Index | Old Index