X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Usermode%2FApplications%2Fpcidump_src%2Fmain.c;h=2bae2c9a762d58b43202638cd4221be41f70d17e;hb=6c7e82169e66197939b83945812b02787ed0f52e;hp=919d5a69fbad947745d6d34096c4dc5bab2a1d7f;hpb=4ed0dbeaa387b3d04e7b2853ceac4e148d0f8ea9;p=tpg%2Facess2.git diff --git a/Usermode/Applications/pcidump_src/main.c b/Usermode/Applications/pcidump_src/main.c index 919d5a69..2bae2c9a 100644 --- a/Usermode/Applications/pcidump_src/main.c +++ b/Usermode/Applications/pcidump_src/main.c @@ -63,25 +63,25 @@ int main(int argc, char *argv[], char *envp[]) fp = open(tmpPath, OPENFLAG_READ); if(fp == -1) continue; - read(fp, 2, &vendor); read(fp, 2, &device); + read(fp, &vendor, 2); read(fp, &device, 2); printf(" Vendor 0x%04x, Device 0x%04x\n", vendor, device); printf(" %s - %s\n", GetVendorName(vendor), GetDeviceName(vendor, device)); // Reuse vendor and device seek(fp, 0x8, SEEK_SET); - read(fp, 2, &vendor); read(fp, 2, &device); + read(fp, &vendor, 2); read(fp, &device, 2); printf(" Revision 0x%04x, Class 0x%04x ()\n", vendor, device); // Read File #if DUMP_BARS seek(fp, 0x10, SEEK_SET); printf("Base Address Registers (BARs):\n"); - read(fp, 4, &tmp32); printf(" 0x%08x", tmp32); - read(fp, 4, &tmp32); printf(" 0x%08x", tmp32); - read(fp, 4, &tmp32); printf(" 0x%08x", tmp32); - read(fp, 4, &tmp32); printf(" 0x%08x", tmp32); - read(fp, 4, &tmp32); printf(" 0x%08x", tmp32); - read(fp, 4, &tmp32); printf(" 0x%08x", tmp32); + read(fp, &tmp32, 4); printf(" 0x%08x", tmp32); + read(fp, &tmp32, 4); printf(" 0x%08x", tmp32); + read(fp, &tmp32, 4); printf(" 0x%08x", tmp32); + read(fp, &tmp32, 4); printf(" 0x%08x", tmp32); + read(fp, &tmp32, 4); printf(" 0x%08x", tmp32); + read(fp, &tmp32, 4); printf(" 0x%08x", tmp32); printf("\n"); #endif printf("\n");