2 * The PCI Utilities -- Declarations
4 * Copyright (c) 1997--2008 Martin Mares <mj@ucw.cz>
6 * Can be freely distributed and used under the terms of the GNU GPL.
10 #include "lib/sysdep.h"
13 #include "compat/getopt.h"
16 #define PCIUTILS_VERSION PCILIB_VERSION
18 extern const char program_name[];
20 void die(char *msg, ...) NONRET PCI_PRINTF(1,2);
21 void *xmalloc(unsigned int howmuch);
22 void *xrealloc(void *ptr, unsigned int howmuch);
23 int parse_generic_option(int i, struct pci_access *pacc, char *optarg);
25 #ifdef PCI_HAVE_PM_INTEL_CONF
26 #define GENOPT_INTEL "H:"
27 #define GENHELP_INTEL "-H <mode>\tUse direct hardware access (<mode> = 1 or 2)\n"
32 #if defined(PCI_HAVE_PM_DUMP) && !defined(PCIUTILS_SETPCI)
33 #define GENOPT_DUMP "F:"
34 #define GENHELP_DUMP "-F <file>\tRead PCI configuration dump from a given file\n"
40 #define GENERIC_OPTIONS "A:GO:" GENOPT_INTEL GENOPT_DUMP
41 #define GENERIC_HELP \
42 "-A <method>\tUse the specified PCI access method (see `-A help' for a list)\n" \
43 "-O <par>=<val>\tSet PCI access parameter (see `-O help' for a list)\n" \
44 "-G\t\tEnable PCI access debugging\n" \
45 GENHELP_INTEL GENHELP_DUMP