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 Don't report EINVAL errors when searching t...



details:   https://anonhg.NetBSD.org/src/rev/3b044bfbd4f4
branches:  trunk
changeset: 338111:3b044bfbd4f4
user:      mlelstv <mlelstv%NetBSD.org@localhost>
date:      Sun May 10 22:21:38 2015 +0000

description:
Don't report EINVAL errors when searching the bootwedge, this error
is most likely the result of reading beyond the end of the wrong disk.

diffstat:

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

diffs (33 lines):

diff -r 965c5a9ec120 -r 3b044bfbd4f4 sys/arch/x86/x86/x86_autoconf.c
--- a/sys/arch/x86/x86/x86_autoconf.c   Sun May 10 22:18:58 2015 +0000
+++ b/sys/arch/x86/x86/x86_autoconf.c   Sun May 10 22:21:38 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: x86_autoconf.c,v 1.73 2015/05/10 22:18:58 mlelstv Exp $        */
+/*     $NetBSD: x86_autoconf.c,v 1.74 2015/05/10 22:21:38 mlelstv 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.73 2015/05/10 22:18:58 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: x86_autoconf.c,v 1.74 2015/05/10 22:21:38 mlelstv Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -235,9 +235,11 @@
                    sizeof(bf), blk * DEV_BSIZE, UIO_SYSSPACE,
                    0, NOCRED, NULL, NULL);
                if (error) {
-                       printf("%s: unable to read block %" PRId64 " "
-                           "of dev %s (%d)\n", __func__,
-                           blk, device_xname(dv), error);
+                       if (error != EINVAL) {
+                               aprint_error("%s: unable to read block %"
+                                   PRId64 " " "of dev %s (%d)\n", __func__,
+                                   blk, device_xname(dv), error);
+                       }
                        goto closeout;
                }
                MD5Update(&ctx, bf, sizeof(bf));



Home | Main Index | Thread Index | Old Index