Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/x86/x86 When we fail to read a block computing the ...



details:   https://anonhg.NetBSD.org/src/rev/3b054b157a0b
branches:  trunk
changeset: 760681:3b054b157a0b
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Mon Jan 10 21:26:38 2011 +0000

description:
When we fail to read a block computing the matching hash,
it's nice to know what device and why.

Also, drop comment that hasn't been valid since 1.12.

diffstat:

 sys/arch/x86/x86/x86_autoconf.c |  9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diffs (37 lines):

diff -r 99650c7b8725 -r 3b054b157a0b sys/arch/x86/x86/x86_autoconf.c
--- a/sys/arch/x86/x86/x86_autoconf.c   Mon Jan 10 20:38:35 2011 +0000
+++ b/sys/arch/x86/x86/x86_autoconf.c   Mon Jan 10 21:26:38 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: x86_autoconf.c,v 1.52 2010/08/21 17:27:20 jmcneill Exp $       */
+/*     $NetBSD: x86_autoconf.c,v 1.53 2011/01/10 21:26:38 jakllsch Exp $       */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: x86_autoconf.c,v 1.52 2010/08/21 17:27:20 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: x86_autoconf.c,v 1.53 2011/01/10 21:26:38 jakllsch Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -218,7 +218,6 @@
 #endif
                if (is_valid_disk(dv)) {
                        n++;
-                       /* XXXJRT why not just dv_xname?? */
                        snprintf(x86_alldisks->dl_nativedisks[n].ni_devname,
                            sizeof(x86_alldisks->dl_nativedisks[n].ni_devname),
                            "%s", device_xname(dv));
@@ -299,8 +298,8 @@
                    sizeof(bf), blk * DEV_BSIZE, UIO_SYSSPACE,
                    0, NOCRED, NULL, NULL);
                if (error) {
-                       printf("findroot: unable to read block %" PRIu64 "\n",
-                           blk);
+                       printf("findroot: unable to read block %" PRId64 " "
+                           "of dev %s (%d)\n", blk, device_xname(dv), error);
                        goto closeout;
                }
                MD5Update(&ctx, bf, sizeof(bf));



Home | Main Index | Thread Index | Old Index