diff mbox

[pciutils] Stop early if the VPD is corrupt

Message ID mj+md-20090704.133334.8943.albireo@ucw.cz (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Martin MareŇ° July 4, 2009, 1:34 p.m. UTC
Hello!

> I have several cards which report more-or-less garbage in their VPD.
> It can take an extraordinarily long time to read all their VPD and none
> of it is of interest.  Instead, if we find an unknown resource type,
> just stop trying to read any more.

This seems wise to do, but we should warn the user. I have applied your
patch with the following on top of it:

commit 169bfd45a4b05df0b6c4a0c17be36d66b6046ab7
Author: Martin Mares <mj@ucw.cz>
Date:   Sat Jul 4 15:33:31 2009 +0200

    Improve the VPD fix to warn the user that VPD decoding was aborted.


				Have a nice fortnight
diff mbox

Patch

diff --git a/ls-vpd.c b/ls-vpd.c
index 6ded2d8..35c2bfa 100644
--- a/ls-vpd.c
+++ b/ls-vpd.c
@@ -196,7 +196,7 @@  cap_vpd(struct device *d)
 	  break;
 
 	default:
-	  printf("\t\tUnknown %s resource type %02x\n",
+	  printf("\t\tUnknown %s resource type %02x, will not decode more.\n",
 		 (tag & 0x80) ? "large" : "small", tag & ~0x80);
 	  return;
 	}