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