]> mj.ucw.cz Git - pciutils.git/blob - pciutils.h
Rewrote the PCI Utilities. All PCI configuration space access has been
[pciutils.git] / pciutils.h
1 /*
2  *      $Id: pciutils.h,v 1.12 1999/01/22 21:04:59 mj Exp $
3  *
4  *      Linux PCI Utilities -- Declarations
5  *
6  *      Copyright (c) 1997--1999 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
7  *
8  *      Can be freely distributed and used under the terms of the GNU GPL.
9  */
10
11 #include "lib/pci.h"
12
13 #define PCIUTILS_VERSION PCILIB_VERSION
14
15 void __attribute__((noreturn)) die(char *msg, ...);
16 void *xmalloc(unsigned int howmuch);
17 int parse_generic_option(int i, struct pci_access *pacc, char *optarg);
18
19 #ifdef HAVE_PM_LINUX_PROC
20 #define GENOPT_PROC "P:"
21 #define GENHELP_PROC "-P <dir>\tUse specified directory instead of " PATH_PROC_BUS_PCI "\n"
22 #else
23 #define GENOPT_PROC
24 #define GENHELP_PROC
25 #endif
26 #ifdef HAVE_PM_INTEL_CONF
27 #define GENOPT_INTEL "H:"
28 #define GENHELP_INTEL "-H <mode>\tUse direct hardware access (<mode> = 1 or 2)\n"
29 #else
30 #define GENOPT_INTEL
31 #define GENHELP_INTEL
32 #endif
33 #ifdef HAVE_PM_SYSCALLS
34 #define GENOPT_SYSCALLS "S"
35 #define GENHELP_SYSCALLS "-S\t\tUse direct hardware access via syscalls\n"
36 #else
37 #define GENOPT_SYSCALLS
38 #define GENHELP_SYSCALLS
39 #endif
40 #ifdef HAVE_PM_DUMP
41 #define GENOPT_DUMP "F:"
42 #define GENHELP_DUMP "-F <file>\tRead configuration data from given file\n"
43 #else
44 #define GENOPT_DUMP
45 #define GENHELP_DUMP
46 #endif
47
48 #define GENERIC_OPTIONS "G" GENOPT_PROC GENOPT_INTEL GENOPT_SYSCALLS GENOPT_DUMP
49 #define GENERIC_HELP GENHELP_PROC GENHELP_INTEL GENHELP_SYSCALLS GENHELP_DUMP \
50         "-G\t\tEnable PCI access debugging\n"