Module Name:    src
Committed By:   pgoyette
Date:           Sun Sep  9 22:12:16 UTC 2018

Modified Files:
        src/sys/dev/raidframe [pgoyette-compat]: rf_netbsdkintf.c

Log Message:
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


To generate a diff of this commit:
cvs rdiff -u -r1.356.2.1 -r1.356.2.2 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.356.2.1 src/sys/dev/raidframe/rf_netbsdkintf.c:1.356.2.2
--- src/sys/dev/raidframe/rf_netbsdkintf.c:1.356.2.1	Sat Mar 24 01:59:15 2018
+++ src/sys/dev/raidframe/rf_netbsdkintf.c	Sun Sep  9 22:12:16 2018
@@ -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 @@ raidioctl(dev_t dev, u_long cmd, void *d
 	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 @@ raidioctl(dev_t dev, u_long cmd, void *d
 	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

Reply via email to