Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Use correct type for todo variable.



details:   https://anonhg.NetBSD.org/src/rev/7bc6bb48b356
branches:  trunk
changeset: 500202:7bc6bb48b356
user:      augustss <augustss%NetBSD.org@localhost>
date:      Fri Dec 08 02:25:50 2000 +0000

description:
Use correct type for todo variable.
Use more explicit panics messages.

diffstat:

 sys/kern/kern_physio.c |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (32 lines):

diff -r 0933e69e71e0 -r 7bc6bb48b356 sys/kern/kern_physio.c
--- a/sys/kern/kern_physio.c    Fri Dec 08 02:24:07 2000 +0000
+++ b/sys/kern/kern_physio.c    Fri Dec 08 02:25:50 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_physio.c,v 1.45 2000/11/27 08:39:43 chs Exp $     */
+/*     $NetBSD: kern_physio.c,v 1.46 2000/12/08 02:25:50 augustss Exp $        */
 
 /*-
  * Copyright (c) 1994 Christopher G. Demetriou
@@ -80,7 +80,8 @@
 {
        struct iovec *iovp;
        struct proc *p = curproc;
-       int error, done, i, nobuf, s, todo;
+       int error, done, i, nobuf, s;
+       long todo;
 
        error = 0;
        flags &= B_READ | B_WRITE | B_ORDERED;
@@ -167,9 +168,10 @@
                        todo = bp->b_bcount;
 #ifdef DIAGNOSTIC
                        if (todo <= 0)
-                               panic("todo <= 0; minphys broken");
+                               panic("todo(%ld) <= 0; minphys broken", todo);
                        if (todo > MAXPHYS)
-                               panic("todo > MAXPHYS; minphys broken");
+                               panic("todo(%ld) > MAXPHYS; minphys broken",
+                                     todo);
 #endif
 
                        /*



Home | Main Index | Thread Index | Old Index