ref: 10415cbb8e94ad88b102169ff876665d6977d41c
parent: f258c3725d81f358242981f7d3b16f80a05a4604
author: cinap_lenrek <cinap_lenrek@centraldogma>
date: Mon May 23 18:32:17 EDT 2011
aux/vga: pci.c strtoul
--- a/sys/src/cmd/aux/vga/pci.c
+++ b/sys/src/cmd/aux/vga/pci.c
@@ -62,15 +62,16 @@
p->rid = pcicfgr8(p, PciRID);
- trace("did=%X vid=%X rid=%X intl=%d ccru=%X\n", p->did, p->vid, p->rid, p->intl, p->ccru);
+ trace("%d.%d.%d: did=%X vid=%X rid=%X intl=%d ccru=%X\n",
+ bno, dno, fno, p->did, p->vid, p->rid, p->intl, p->ccru);
while(*s == ' '){
j = strtol(s+1, &s, 10);
if(j < 0 || j >= nelem(p->mem))
break;
- p->mem[j].bar = strtol(s+1, &s, 16);
- p->mem[j].size = strtol(s+1, &s, 10);
- trace("\t->mem[%d] = %p %d\n", j, p->mem[j].bar, p->mem[j].size);
+ p->mem[j].bar = strtoul(s+1, &s, 16);
+ p->mem[j].size = strtoul(s+1, &s, 10);
+ trace("\tmem[%d] = %p %d\n", j, p->mem[j].bar, p->mem[j].size);
}
if(pcilist != nil)