]> git.pld-linux.org Git - packages/net-snmp.git/blobdiff - net-snmp-libpci-init.patch
- do not allow hrSWInstalledTable query to use dpkg-query even if it finds it; REL 6
[packages/net-snmp.git] / net-snmp-libpci-init.patch
index b29ce268b401979bd06a22dd274d08a08d622697..4adca98f434097e89f6423168959cefd78e9c87a 100644 (file)
 +  va_list args;
 +
 +  va_start(args, msg);
-+  fputs("pcilib: ", stderr);
-+  vfprintf(stderr, msg, args);
-+  fputc('\n', stderr);
++  snmp_log(LOG_ERR, "pcilib: ");
++  snmp_vlog(LOG_ERR, msg, args);
++  snmp_log(LOG_ERR, "\n");
 +  _net_snmp_pci_status = 0;
 +}
  #endif
  
  #ifdef HAVE_LINUX_ETHTOOL_H
-@@ -146,9 +158,13 @@
+@@ -146,9 +158,15 @@
  
  #ifdef HAVE_PCI_LOOKUP_NAME
      pci_access = pci_alloc();
 -    if (pci_access)
 +    if (pci_access) {
++      pci_access->error = _net_snmp_pci_error;
        pci_init(pci_access);
 -    else
 +      if (_net_snmp_pci_status == 0) {
 +          pci_cleanup(pci_access);
 +          pci_access = NULL;
++          snmp_log(LOG_ERR, "Unable to create pci access method (libpci)\n");
 +      }
 +    } else
        snmp_log(LOG_ERR, "Unable to create pci access method\n");
This page took 0.123858 seconds and 4 git commands to generate.