Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/raidframe Fix GET_INFO. Yes, can probably be simpli...



details:   https://anonhg.NetBSD.org/src/rev/9809ac228ceb
branches:  trunk
changeset: 448613:9809ac228ceb
user:      oster <oster%NetBSD.org@localhost>
date:      Wed Feb 06 03:37:13 2019 +0000

description:
Fix GET_INFO.  Yes, can probably be simplified.

diffstat:

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

diffs (43 lines):

diff -r 488afeaa533b -r 9809ac228ceb sys/dev/raidframe/rf_netbsdkintf.c
--- a/sys/dev/raidframe/rf_netbsdkintf.c        Wed Feb 06 03:16:35 2019 +0000
+++ b/sys/dev/raidframe/rf_netbsdkintf.c        Wed Feb 06 03:37:13 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rf_netbsdkintf.c,v 1.370 2019/02/06 03:01:48 christos Exp $    */
+/*     $NetBSD: rf_netbsdkintf.c,v 1.371 2019/02/06 03:37:13 oster 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.370 2019/02/06 03:01:48 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.371 2019/02/06 03:37:13 oster Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_raid_autoconfig.h"
@@ -1399,7 +1399,7 @@
        RF_Raid_t *raidPtr;
        RF_AccTotals_t *totals;
        RF_SingleComponent_t component;
-       RF_DeviceConfig_t *d_cfg;
+       RF_DeviceConfig_t *d_cfg, *ucfgp;
        int retcode = 0;
        int column;
        RF_ComponentLabel_t *clabel;
@@ -1513,13 +1513,14 @@
                return rf_rebuild_in_place(raidPtr, data);
 
        case RAIDFRAME_GET_INFO:
+               ucfgp = *(RF_DeviceConfig_t **)data;
                RF_Malloc(d_cfg, sizeof(RF_DeviceConfig_t),
                          (RF_DeviceConfig_t *));
                if (d_cfg == NULL)
                        return ENOMEM;
                retcode = rf_get_info(raidPtr, d_cfg);
                if (retcode == 0) {
-                       retcode = copyout(d_cfg, data, sizeof(*d_cfg));
+                       retcode = copyout(d_cfg, ucfgp, sizeof(*d_cfg));
                }
                RF_Free(d_cfg, sizeof(RF_DeviceConfig_t));
                return retcode;



Home | Main Index | Thread Index | Old Index