Source-Changes-HG archive

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

[src/pgoyette-compat]: src/sys/dev/raidframe In the case of no compat modules...



details:   https://anonhg.NetBSD.org/src/rev/8b9248958eec
branches:  pgoyette-compat
changeset: 830631:8b9248958eec
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Sun Sep 09 22:12:16 2018 +0000

description:
In the case of no compat modules (ENOSYS returned from the stubs), reset
the retcode to zero so we don't return the wrong value when there is
nothing to do for the particular command.  This was causing spurious
failures for RAIDFRAME_SET_COMPONENT_LABEL which is wrapped in

        #if 0
        ...
        #endif

diffstat:

 sys/dev/raidframe/rf_netbsdkintf.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (41 lines):

diff -r 89f371235cbe -r 8b9248958eec sys/dev/raidframe/rf_netbsdkintf.c
--- a/sys/dev/raidframe/rf_netbsdkintf.c        Sun Sep 09 11:54:10 2018 +0000
+++ b/sys/dev/raidframe/rf_netbsdkintf.c        Sun Sep 09 22:12:16 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rf_netbsdkintf.c,v 1.356.2.1 2018/03/24 01:59:15 pgoyette Exp $        */
+/*     $NetBSD: rf_netbsdkintf.c,v 1.356.2.2 2018/09/09 22:12:16 pgoyette 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.356.2.1 2018/03/24 01:59:15 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.356.2.2 2018/09/09 22:12:16 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -1123,7 +1123,7 @@
        retcode = (*raidframe50_ioctl)(cmd, (rs->sc_flags & RAIDF_INITED),
            raidPtr, unit, data, &k_cfg);
        if (retcode == ENOSYS)
-               retcode = EINVAL;
+               retcode = 0;
        else if (retcode == EAGAIN)
                goto config;
        else if (retcode != EPASSTHROUGH)
@@ -1132,11 +1132,12 @@
        retcode = (*raidframe80_ioctl)(cmd, (rs->sc_flags & RAIDF_INITED),
            raidPtr, unit, data, &k_cfg);
        if (retcode == ENOSYS)
-               retcode = EINVAL;
+               retcode = 0;
        else if (retcode == EAGAIN)
                goto config;
        else if (retcode != EPASSTHROUGH)
                return retcode;
+
        /*
         * XXX
         * Handling of FAIL_DISK80 command requires us to retain retcode's



Home | Main Index | Thread Index | Old Index