Mercurial > mplayer.hg
comparison libdha/test.c @ 3973:138800dfbe22
preliminary support of direct hardware access
author | nick |
---|---|
date | Fri, 04 Jan 2002 10:32:26 +0000 |
parents | |
children | f6d2772efca3 |
comparison
equal
deleted
inserted
replaced
3972:f021941d26c9 | 3973:138800dfbe22 |
---|---|
1 #include "libdha.h" | |
2 #include <stdio.h> | |
3 #include <string.h> | |
4 #include <stdlib.h> | |
5 | |
6 int main( void ) | |
7 { | |
8 pciinfo_t lst[MAX_PCI_DEVICES]; | |
9 unsigned i,num_pci; | |
10 int err; | |
11 err = pci_scan(lst,&num_pci); | |
12 if(err) | |
13 { | |
14 printf("Error occured during pci scan: %s\n",strerror(err)); | |
15 return EXIT_FAILURE; | |
16 } | |
17 else | |
18 { | |
19 printf(" Bus:card:func vend:dev base0 :base1 :base2 :baserom\n"); | |
20 for(i=0;i<num_pci;i++) | |
21 printf("%04X:%04X:%04X %04X:%04X %08X:%08X:%08X:%08X\n" | |
22 ,lst[i].bus,lst[i].card,lst[i].func | |
23 ,lst[i].vendor,lst[i].device | |
24 ,lst[i].base0,lst[i].base1,lst[i].base2,lst[i].baserom); | |
25 } | |
26 return EXIT_SUCCESS; | |
27 } |