Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/raidframe - don't overwrite existing error.
details: https://anonhg.NetBSD.org/src/rev/c76214f84315
branches: trunk
changeset: 974431:c76214f84315
user: christos <christos%NetBSD.org@localhost>
date: Fri Jul 31 20:34:38 2020 +0000
description:
- don't overwrite existing error.
- return the error not 0 if failing.
diffstat:
sys/dev/raidframe/rf_netbsdkintf.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (45 lines):
diff -r 10cdb96bf0d2 -r c76214f84315 sys/dev/raidframe/rf_netbsdkintf.c
--- a/sys/dev/raidframe/rf_netbsdkintf.c Fri Jul 31 20:22:10 2020 +0000
+++ b/sys/dev/raidframe/rf_netbsdkintf.c Fri Jul 31 20:34:38 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_netbsdkintf.c,v 1.386 2020/07/31 19:30:09 christos Exp $ */
+/* $NetBSD: rf_netbsdkintf.c,v 1.387 2020/07/31 20:34:38 christos 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.386 2020/07/31 19:30:09 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.387 2020/07/31 20:34:38 christos Exp $");
#ifdef _KERNEL_OPT
#include "opt_raid_autoconfig.h"
@@ -3673,7 +3673,7 @@
printf("raid%d: cache flush[%d] to component %s failed (%d)\n",
raidPtr->raidid, i, raidPtr->Disks[c].devname, e);
}
- return 0;
+ return e;
}
int
@@ -3685,7 +3685,7 @@
for (c = 0; c < raidPtr->numCol; c++) {
if (raidPtr->Disks[c].status == rf_ds_optimal) {
int e = rf_sync_component_cache(raidPtr, c);
- if (error == 0)
+ if (e && !error)
error = e;
}
}
@@ -3695,7 +3695,7 @@
/* Need to ensure that the reconstruct actually completed! */
if (raidPtr->Disks[sparecol].status == rf_ds_used_spare) {
int e = rf_sync_component_cache(raidPtr, sparecol);
- if (error == 0)
+ if (e && !error)
error = e;
continue;
}
Home |
Main Index |
Thread Index |
Old Index