Source-Changes-HG archive

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

[src/trunk]: src/sys/dev Set b_resid in error path.



details:   https://anonhg.NetBSD.org/src/rev/62d9a93ffa5c
branches:  trunk
changeset: 347747:62d9a93ffa5c
user:      mlelstv <mlelstv%NetBSD.org@localhost>
date:      Wed Sep 14 23:05:05 2016 +0000

description:
Set b_resid in error path.

diffstat:

 sys/dev/dksubr.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r f88ca9307ebc -r 62d9a93ffa5c sys/dev/dksubr.c
--- a/sys/dev/dksubr.c  Wed Sep 14 20:04:22 2016 +0000
+++ b/sys/dev/dksubr.c  Wed Sep 14 23:05:05 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dksubr.c,v 1.88 2016/06/27 18:27:51 christos Exp $ */
+/* $NetBSD: dksubr.c,v 1.89 2016/09/14 23:05:05 mlelstv Exp $ */
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 1999, 2002, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dksubr.c,v 1.88 2016/06/27 18:27:51 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dksubr.c,v 1.89 2016/09/14 23:05:05 mlelstv Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -286,7 +286,8 @@
 
        if (!(dksc->sc_flags & DKF_INITED)) {
                DPRINTF_FOLLOW(("%s: not inited\n", __func__));
-               bp->b_error  = ENXIO;
+               bp->b_error = ENXIO;
+               bp->b_resid = bp->b_bcount;
                biodone(bp);
                return 1;
        }



Home | Main Index | Thread Index | Old Index