X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lspci.c;h=8374788197413cb6a3943c290c9ad216ae8e8824;hb=cce2caac70e8052540e783de03001101c38d937c;hp=6e0a77fd4857540342caf0e2cce938af1f5ff431;hpb=bfc4fe7a915a005d8ef6a9d45c5260591ac11fe7;p=pciutils.git diff --git a/lspci.c b/lspci.c index 6e0a77f..8374788 100644 --- a/lspci.c +++ b/lspci.c @@ -404,8 +404,7 @@ format_agp_rate(int rate, char *buf, int agp3) { if (c != buf) *c++ = ','; - *c++ = 'x'; - *c++ = '0' + (1 << (i + 2*agp3)); + c += sprintf(c, "x%d", 1 << (i + 2*agp3)); } if (c != buf) *c = 0; @@ -417,7 +416,7 @@ static void show_agp(struct device *d, int where, int cap) { u32 t; - char rate[8]; + char rate[16]; int ver, rev; int agp3 = 0; @@ -1182,7 +1181,7 @@ show_verbose(struct device *d) subsys_d = get_conf_word(d, PCI_SUBSYSTEM_ID); break; case PCI_HEADER_TYPE_BRIDGE: - if (class != PCI_CLASS_BRIDGE_PCI) + if ((class >> 8) != PCI_BASE_CLASS_BRIDGE) printf("\t!!! Invalid class %04x for header type %02x\n", class, htype); irq = int_pin = min_gnt = max_lat = 0; subsys_v = subsys_d = 0;