]> mj.ucw.cz Git - pciutils.git/blobdiff - common.c
Be ISO C89 compliant (still needed for MSVC)
[pciutils.git] / common.c
index 77974f314f5fca7f736d2c356465b40b0d8fc1c2..8ea52fa6d7b5398d2ff4a1c90cd9faa10ca410a7 100644 (file)
--- a/common.c
+++ b/common.c
@@ -44,6 +44,15 @@ xrealloc(void *ptr, unsigned int howmuch)
   return p;
 }
 
+char *
+xstrdup(char *str)
+{
+  int len = strlen(str) + 1;
+  char *copy = xmalloc(len);
+  memcpy(copy, str, len);
+  return copy;
+}
+
 static void
 set_pci_method(struct pci_access *pacc, char *arg)
 {
@@ -94,12 +103,6 @@ parse_generic_option(int i, struct pci_access *pacc, char *optarg)
 {
   switch (i)
     {
-#ifdef PCI_HAVE_PM_LINUX_PROC
-    case 'P':
-      pci_set_param(pacc, "proc.path", optarg);
-      pacc->method = PCI_ACCESS_PROC_BUS_PCI;
-      break;
-#endif
 #ifdef PCI_HAVE_PM_INTEL_CONF
     case 'H':
       if (!strcmp(optarg, "1"))