X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=common.c;h=8ea52fa6d7b5398d2ff4a1c90cd9faa10ca410a7;hb=e2864327195d067728dd904f8ff72959c8097508;hp=77974f314f5fca7f736d2c356465b40b0d8fc1c2;hpb=a0407443c25b4a1fcb3a37261a56ae48d65f447e;p=pciutils.git diff --git a/common.c b/common.c index 77974f3..8ea52fa 100644 --- 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"))