From: Ian Romanick Date: Mon, 27 Mar 2006 18:08:42 +0000 (+0000) Subject: Remove src/pcils.c and src/Makefile.foo. Add src/scanpci.c. X-Git-Tag: XORG-7_0_99_901 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5b4db5c392c123f71a7933bd94c789b5e23dd69a;p=platform%2Fupstream%2Flibpciaccess.git Remove src/pcils.c and src/Makefile.foo. Add src/scanpci.c. Bump version to 0.3.0. Replace pci_get_name with pci_get_strings. This function matches the functionality provided by the Xorg scanpci module almost identically. --- diff --git a/ChangeLog b/ChangeLog index 8f2c962..8494f32 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2006-03-27 Ian Romanick + + * Makefile.am: + Remove src/pcils.c and src/Makefile.foo. Add src/scanpci.c. + + * configure.ac: + * src/Makefile.am: + Bump version to 0.3.0. + + * include/pciaccess.h: + * src/common_device_name.c: (pci_get_strings): + Replace pci_get_name with pci_get_strings. This function + matches the functionality provided by the Xorg scanpci module + almost identically. + 2006-03-24 Ian D. Romanick * src/Makefile.foo: Drop from CVS. diff --git a/Makefile.am b/Makefile.am index 8a112b4..bf7eb7d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -26,5 +26,4 @@ SUBDIRS = src pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = pciaccess.pc -EXTRA_DIST = pciaccess.pc.in autogen.sh src/pcils.c src/Makefile.foo - +EXTRA_DIST = pciaccess.pc.in autogen.sh src/scanpci.c diff --git a/configure.ac b/configure.ac index a0c2746..4d0e1b8 100644 --- a/configure.ac +++ b/configure.ac @@ -41,7 +41,7 @@ dnl refers to ${prefix}. Thus we have to use `eval' twice. AC_PREREQ([2.57]) -AC_INIT(libpciaccess, 0.2, [none yet], libpciaccess) +AC_INIT(libpciaccess, 0.3.0, [none yet], libpciaccess) AM_INIT_AUTOMAKE([dist-bzip2]) AM_MAINTAINER_MODE diff --git a/include/pciaccess.h b/include/pciaccess.h index fec8271..d4cb04d 100644 --- a/include/pciaccess.h +++ b/include/pciaccess.h @@ -57,6 +57,9 @@ void pci_iterator_destroy( struct pci_device_iterator * iter ); struct pci_device * pci_device_next( struct pci_device_iterator * iter ); +void pci_get_strings( const struct pci_id_match * m, + const char ** device_name, const char ** vendor_name, + const char ** subdevice_name, const char ** subvendor_name ); const char * pci_get_name( const struct pci_id_match * m ); const char * pci_device_get_device_name( const struct pci_device * dev ); const char * pci_device_get_subdevice_name( const struct pci_device * dev ); diff --git a/src/Makefile.am b/src/Makefile.am index c6232d7..f815ee5 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -34,7 +34,7 @@ INCLUDES = -I$(top_srcdir)/include libpciaccess_la_LIBADD = @PCIACCESS_LIBS@ -libpciaccess_la_LDFLAGS = -version-number 0:2:0 -no-undefined +libpciaccess_la_LDFLAGS = -version-number 0:3:0 -no-undefined libpciaccessincludedir = $(includedir) libpciaccessinclude_HEADERS = \ diff --git a/src/common_device_name.c b/src/common_device_name.c index 2a0d5bf..df2212e 100644 --- a/src/common_device_name.c +++ b/src/common_device_name.c @@ -335,10 +335,35 @@ find_vendor_name( const struct pci_id_match * m ) /** * Get a name based on an arbitrary PCI search structure. */ -const char * -pci_get_name( const struct pci_id_match * m ) +void +pci_get_strings( const struct pci_id_match * m, + const char ** device_name, + const char ** vendor_name, + const char ** subdevice_name, + const char ** subvendor_name ) { - return find_device_name( m ); + struct pci_id_match temp; + + + temp = *m; + temp.subvendor_id = PCI_MATCH_ANY; + temp.subdevice_id = PCI_MATCH_ANY; + + if ( device_name != NULL ) { + *device_name = find_device_name( & temp ); + } + + if ( vendor_name != NULL ) { + *vendor_name = find_vendor_name( & temp ); + } + + if ( subdevice_name != NULL ) { + *subdevice_name = find_device_name( m ); + } + + if ( subvendor_name != NULL ) { + *subvendor_name = find_vendor_name( m ); + } }