OSDN Git Service

Remove src/pcils.c and src/Makefile.foo. Add src/scanpci.c.
authorIan Romanick <idr@us.ibm.com>
Mon, 27 Mar 2006 18:08:42 +0000 (18:08 +0000)
committerIan Romanick <idr@us.ibm.com>
Mon, 27 Mar 2006 18:08:42 +0000 (18:08 +0000)
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.

ChangeLog
Makefile.am
configure.ac
include/pciaccess.h
src/Makefile.am
src/common_device_name.c

index 8f2c962..8494f32 100644 (file)
--- 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.
index 8a112b4..bf7eb7d 100644 (file)
@@ -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
index a0c2746..4d0e1b8 100644 (file)
@@ -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
 
index fec8271..d4cb04d 100644 (file)
@@ -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 );
index c6232d7..f815ee5 100644 (file)
@@ -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 = \
index 2a0d5bf..df2212e 100644 (file)
@@ -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 );
+    }
 }