Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb Improve a panic message slightly



details:   https://anonhg.NetBSD.org/src/rev/1a8b686e7892
branches:  trunk
changeset: 783871:1a8b686e7892
user:      skrll <skrll%NetBSD.org@localhost>
date:      Fri Jan 11 06:22:23 2013 +0000

description:
Improve a panic message slightly

diffstat:

 sys/dev/usb/umass.c |  11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diffs (32 lines):

diff -r b8fae4d4e8b2 -r 1a8b686e7892 sys/dev/usb/umass.c
--- a/sys/dev/usb/umass.c       Fri Jan 11 04:32:41 2013 +0000
+++ b/sys/dev/usb/umass.c       Fri Jan 11 06:22:23 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: umass.c,v 1.146 2012/08/24 12:20:02 drochner Exp $     */
+/*     $NetBSD: umass.c,v 1.147 2013/01/11 06:22:23 skrll Exp $        */
 
 /*
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -124,7 +124,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: umass.c,v 1.146 2012/08/24 12:20:02 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: umass.c,v 1.147 2013/01/11 06:22:23 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_umass.h"
@@ -1241,9 +1241,10 @@
 
                } else if (sc->transfer_actlen > sc->transfer_datalen) {
                        /* Buffer overrun! Don't let this go by unnoticed */
-                       panic("%s: transferred %d bytes instead of %d bytes",
-                               device_xname(sc->sc_dev),
-                               sc->transfer_actlen, sc->transfer_datalen);
+                       panic("%s: transferred %s %d bytes instead of %d bytes",
+                           device_xname(sc->sc_dev),
+                           sc->transfer_dir == DIR_IN ? "IN" : "OUT",
+                           sc->transfer_actlen, sc->transfer_datalen);
 #if 0
                } else if (sc->transfer_datalen - sc->transfer_actlen
                           != residue) {



Home | Main Index | Thread Index | Old Index