summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog15
-rw-r--r--Makefile.am3
-rw-r--r--configure.ac2
-rw-r--r--include/pciaccess.h3
-rw-r--r--src/Makefile.am2
-rw-r--r--src/common_device_name.c31
6 files changed, 49 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 8f2c962..8494f32 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2006-03-27 Ian Romanick <idr@us.ibm.com>
+
+ * 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 <idr@us.ibm.com>
* 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 );
+ }
}