Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/cardbus If we read a bad header signature, report wh...
details: https://anonhg.NetBSD.org/src/rev/7328af6417bd
branches: trunk
changeset: 481652:7328af6417bd
user: thorpej <thorpej%NetBSD.org@localhost>
date: Thu Feb 03 06:47:31 2000 +0000
description:
If we read a bad header signature, report what we read.
diffstat:
sys/dev/cardbus/cardbus_exrom.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (25 lines):
diff -r a0502effe6d4 -r 7328af6417bd sys/dev/cardbus/cardbus_exrom.c
--- a/sys/dev/cardbus/cardbus_exrom.c Thu Feb 03 06:25:09 2000 +0000
+++ b/sys/dev/cardbus/cardbus_exrom.c Thu Feb 03 06:47:31 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cardbus_exrom.c,v 1.3 1999/12/08 16:52:51 joda Exp $ */
+/* $NetBSD: cardbus_exrom.c,v 1.4 2000/02/03 06:47:31 thorpej Exp $ */
/*
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -102,10 +102,12 @@
do {
size_t image_size;
struct cardbus_rom_image *image;
+ u_int16_t val;
- if(READ_INT16(romt, romh, addr + CARDBUS_EXROM_SIGNATURE) != 0xaa55) {
- printf("%s: bad header signature in ROM image %u\n",
- __func__, rom_image);
+ val = READ_INT16(romt, romh, addr + CARDBUS_EXROM_SIGNATURE);
+ if(val != 0xaa55) {
+ printf("%s: bad header signature in ROM image %u: 0x%04x\n",
+ __func__, rom_image, val);
return 1;
}
dataptr = addr + READ_INT16(romt, romh, addr + CARDBUS_EXROM_DATA_PTR);
Home |
Main Index |
Thread Index |
Old Index