Module Name:    src
Committed By:   tsutsui
Date:           Wed Apr 16 12:01:53 UTC 2014

Modified Files:
        src/sys/arch/luna68k/stand/boot: sd.c

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

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


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/luna68k/stand/boot/sd.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/arch/luna68k/stand/boot/sd.c
diff -u src/sys/arch/luna68k/stand/boot/sd.c:1.10 src/sys/arch/luna68k/stand/boot/sd.c:1.11
--- src/sys/arch/luna68k/stand/boot/sd.c:1.10	Sat Jan 11 15:51:02 2014
+++ src/sys/arch/luna68k/stand/boot/sd.c	Wed Apr 16 12:01:53 2014
@@ -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 @@ sdstrategy(void *devdata, int func, dadd
 #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;
 

Reply via email to