X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fproc.c;h=f493e491e771684c0ebd0e87843d3319bf89f7cb;hb=dc01dd60affb4688453f8b7204af66246f0850db;hp=8afe7a3bd3197936d7b0b95485ed5045bddbb083;hpb=11f7b31bba25a7cdabb3cd64d3c6ba89975a2695;p=pciutils.git diff --git a/lib/proc.c b/lib/proc.c index 8afe7a3..f493e49 100644 --- a/lib/proc.c +++ b/lib/proc.c @@ -21,7 +21,7 @@ static void proc_config(struct pci_access *a) { - a->method_params[PCI_ACCESS_PROC_BUS_PCI] = PATH_PROC_BUS_PCI; + a->method_params[PCI_ACCESS_PROC_BUS_PCI] = PCI_PATH_PROC_BUS_PCI; } static int @@ -97,7 +97,6 @@ proc_scan(struct pci_access *a) d->func = PCI_FUNC(dfn & 0xff); d->vendor_id = vend >> 16U; d->device_id = vend & 0xffff; - d->hdrtype = pci_read_byte(d, PCI_HEADER_TYPE) & 0x7f; known = PCI_FILL_IDENT; if (!a->buscentric) { @@ -154,10 +153,7 @@ proc_read(struct pci_dev *d, int pos, byte *buf, int len) return 0; } else if (res != len) - { - d->access->warning("proc_read: tried to read %d bytes at %d, but got only %d", len, pos, res); - return 0; - } + return 0; return 1; } @@ -177,7 +173,7 @@ proc_write(struct pci_dev *d, int pos, byte *buf, int len) } else if (res != len) { - d->access->warning("proc_write: tried to write %d bytes at %d, but got only %d", len, pos, res); + d->access->warning("proc_write: tried to write %d bytes at %d, but only %d succeeded", len, pos, res); return 0; } return 1;