Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/luna68k/stand/boot Check a status code and return p...



details:   https://anonhg.NetBSD.org/src/rev/2d1cc157c379
branches:  trunk
changeset: 328745:2d1cc157c379
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Wed Apr 16 12:01:53 2014 +0000

description:
Check a status code and return proper errno in sdstrategy().

Suggested by gcc 4.8 -Wunused-but-set-variable warning to use the variable.

diffstat:

 sys/arch/luna68k/stand/boot/sd.c |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (19 lines):

diff -r 8a1c3b67c1f7 -r 2d1cc157c379 sys/arch/luna68k/stand/boot/sd.c
--- a/sys/arch/luna68k/stand/boot/sd.c  Wed Apr 16 11:18:00 2014 +0000
+++ b/sys/arch/luna68k/stand/boot/sd.c  Wed Apr 16 12:01:53 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sd.c,v 1.10 2014/01/11 15:51:02 tsutsui Exp $  */
+/*     $NetBSD: sd.c,v 1.11 2014/04/16 12:01:53 tsutsui Exp $  */
 
 /*
  * Copyright (c) 1992 OMRON Corporation.
@@ -266,6 +266,9 @@
 #endif
        stat = scsi_immed_command(sc->sc_ctlr, sc->sc_tgt, sc->sc_lun,
            cdb, buf, size);
+       if (stat != 0)
+               return EIO;
+
        if (rsize)
                *rsize = size;
 



Home | Main Index | Thread Index | Old Index