]> mj.ucw.cz Git - pciutils.git/blobdiff - common.c
hurd: fix filling information
[pciutils.git] / common.c
index 9cd72bee122dacc6b13248215c0f225bbd7413b3..3d69dd0b4a5ab45384fa4f86f76147f3445a3b0e 100644 (file)
--- a/common.c
+++ b/common.c
@@ -10,7 +10,6 @@
 #include <string.h>
 #include <stdlib.h>
 #include <stdarg.h>
 #include <string.h>
 #include <stdlib.h>
 #include <stdarg.h>
-#include <unistd.h>
 
 #include "pciutils.h"
 
 
 #include "pciutils.h"
 
@@ -99,34 +98,34 @@ set_pci_option(struct pci_access *pacc, char *arg)
 }
 
 int
 }
 
 int
-parse_generic_option(int i, struct pci_access *pacc, char *optarg)
+parse_generic_option(int i, struct pci_access *pacc, char *arg)
 {
   switch (i)
     {
 #ifdef PCI_HAVE_PM_INTEL_CONF
     case 'H':
 {
   switch (i)
     {
 #ifdef PCI_HAVE_PM_INTEL_CONF
     case 'H':
-      if (!strcmp(optarg, "1"))
+      if (!strcmp(arg, "1"))
        pacc->method = PCI_ACCESS_I386_TYPE1;
        pacc->method = PCI_ACCESS_I386_TYPE1;
-      else if (!strcmp(optarg, "2"))
+      else if (!strcmp(arg, "2"))
        pacc->method = PCI_ACCESS_I386_TYPE2;
       else
        pacc->method = PCI_ACCESS_I386_TYPE2;
       else
-       die("Unknown hardware configuration type %s", optarg);
+       die("Unknown hardware configuration type %s", arg);
       break;
 #endif
 #ifdef PCI_HAVE_PM_DUMP
     case 'F':
       break;
 #endif
 #ifdef PCI_HAVE_PM_DUMP
     case 'F':
-      pci_set_param(pacc, "dump.name", optarg);
+      pci_set_param(pacc, "dump.name", arg);
       pacc->method = PCI_ACCESS_DUMP;
       break;
 #endif
     case 'A':
       pacc->method = PCI_ACCESS_DUMP;
       break;
 #endif
     case 'A':
-      set_pci_method(pacc, optarg);
+      set_pci_method(pacc, arg);
       break;
     case 'G':
       pacc->debugging++;
       break;
     case 'O':
       break;
     case 'G':
       pacc->debugging++;
       break;
     case 'O':
-      set_pci_option(pacc, optarg);
+      set_pci_option(pacc, arg);
       break;
     default:
       return 0;
       break;
     default:
       return 0;