]> mj.ucw.cz Git - pciutils.git/commitdiff
Use symbol versioning for our new member of struct pci_dev
authorMartin Mares <mj@ucw.cz>
Mon, 1 Apr 2013 13:42:50 +0000 (15:42 +0200)
committerMartin Mares <mj@ucw.cz>
Mon, 1 Apr 2013 13:42:50 +0000 (15:42 +0200)
Makefile
lib/access.c
lib/caps.c
lib/filter.c
lib/internal.h
lib/libpci.ver
lib/pci.h

index 8a3d396b0afb4941bd2c69e064ada857d91de6e7..fb240caae717e4a571e1c2e50e6b4469434e5191 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -22,6 +22,7 @@ DNS=
 SHARED=no
 
 # ABI version suffix in the name of the shared library
+# (as we use proper symbol versioning, this seldom needs changing)
 ABI_VERSION=.3
 
 # Installation directories
index faad7c4847043bfd1bc0e0832f2f4379ba0fc7eb..5112504173f6814b371b66c1236308212e8010c5 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *     The PCI Library -- User Access
  *
- *     Copyright (c) 1997--2008 Martin Mares <mj@ucw.cz>
+ *     Copyright (c) 1997--2013 Martin Mares <mj@ucw.cz>
  *
  *     Can be freely distributed and used under the terms of the GNU GPL.
  */
@@ -153,7 +153,7 @@ pci_write_block(struct pci_dev *d, int pos, byte *buf, int len)
 }
 
 int
-pci_fill_info_v31(struct pci_dev *d, int flags)
+pci_fill_info_v32(struct pci_dev *d, int flags)
 {
   if (flags & PCI_FILL_RESCAN)
     {
@@ -167,10 +167,13 @@ pci_fill_info_v31(struct pci_dev *d, int flags)
 }
 
 /* In version 3.1, pci_fill_info got new flags => versioned alias */
-STATIC_ALIAS(int pci_fill_info(struct pci_dev *d, int flags), pci_fill_info_v31(d,flags));
-DEFINE_ALIAS(int pci_fill_info_v30(struct pci_dev *d, int flags), pci_fill_info_v31);
+/* In version 3.2, the same has happened */
+STATIC_ALIAS(int pci_fill_info(struct pci_dev *d, int flags), pci_fill_info_v32(d, flags));
+DEFINE_ALIAS(int pci_fill_info_v30(struct pci_dev *d, int flags), pci_fill_info_v32);
+DEFINE_ALIAS(int pci_fill_info_v31(struct pci_dev *d, int flags), pci_fill_info_v32);
 SYMBOL_VERSION(pci_fill_info_v30, pci_fill_info@LIBPCI_3.0);
-SYMBOL_VERSION(pci_fill_info_v31, pci_fill_info@@LIBPCI_3.1);
+SYMBOL_VERSION(pci_fill_info_v31, pci_fill_info@LIBPCI_3.1);
+SYMBOL_VERSION(pci_fill_info_v32, pci_fill_info@@LIBPCI_3.2);
 
 void
 pci_setup_cache(struct pci_dev *d, byte *cache, int len)
index ff4d9c43c97f306a394d9f26ac7ed8b1c18322e4..2378591fb739ed25d4b96449fef0b82331218c64 100644 (file)
@@ -106,7 +106,7 @@ pci_find_cap(struct pci_dev *d, unsigned int id, unsigned int type)
 {
   struct pci_cap *c;
 
-  pci_fill_info_v31(d, ((type == PCI_CAP_NORMAL) ? PCI_FILL_CAPS : PCI_FILL_EXT_CAPS));
+  pci_fill_info_v32(d, ((type == PCI_CAP_NORMAL) ? PCI_FILL_CAPS : PCI_FILL_EXT_CAPS));
   for (c=d->first_cap; c; c=c->next)
     if (c->type == type && c->id == id)
       return c;
index 0b7ce6e6e9bb6df8500683caf2001d2e0f07b3c1..f321b0f57b7bf007ac12626d4ce4611e8434a8fd 100644 (file)
@@ -114,7 +114,7 @@ pci_filter_match(struct pci_filter *f, struct pci_dev *d)
     return 0;
   if (f->device >= 0 || f->vendor >= 0)
     {
-      pci_fill_info_v31(d, PCI_FILL_IDENT);
+      pci_fill_info_v32(d, PCI_FILL_IDENT);
       if ((f->device >= 0 && f->device != d->device_id) ||
          (f->vendor >= 0 && f->vendor != d->vendor_id))
        return 0;
index 0d9510915a029c03727c49d285e2b7a392978af0..9718be610680ce2fc9afa675de70a8054611bb3a 100644 (file)
@@ -56,6 +56,7 @@ int pci_link_dev(struct pci_access *, struct pci_dev *);
 
 int pci_fill_info_v30(struct pci_dev *, int flags) PCI_ABI;
 int pci_fill_info_v31(struct pci_dev *, int flags) PCI_ABI;
+int pci_fill_info_v32(struct pci_dev *, int flags) PCI_ABI;
 
 /* params.c */
 void pci_define_param(struct pci_access *acc, char *param, char *val, char *help);
index 2f7dff7a085433a25d89c6948754068b2a71a7f3..3f73fca749425b47aa0d3b7eec3a856fbf88f8bc 100644 (file)
@@ -47,3 +47,8 @@ LIBPCI_3.1 {
                pci_find_cap;
                pci_read_vpd;
 };
+
+LIBPCI_3.2 {
+       global:
+               pci_fill_info;
+};
index 148b055206fd6084e555c255918ea82b3496b624..38e2e9911d228f3e21ba82924f36591a3ae25606 100644 (file)
--- a/lib/pci.h
+++ b/lib/pci.h
@@ -16,7 +16,7 @@
 #include "header.h"
 #include "types.h"
 
-#define PCI_LIB_VERSION 0x030100
+#define PCI_LIB_VERSION 0x030200
 
 #ifndef PCI_ABI
 #define PCI_ABI