]> git.ipfire.org Git - thirdparty/pciutils.git/blame - pciutils.h
Removed $Id$
[thirdparty/pciutils.git] / pciutils.h
CommitLineData
98e39e09 1/*
98e39e09
MM
2 * Linux PCI Utilities -- Declarations
3 *
a27a33dd 4 * Copyright (c) 1997--1999 Martin Mares <mj@ucw.cz>
98e39e09
MM
5 *
6 * Can be freely distributed and used under the terms of the GNU GPL.
7 */
8
727ce158 9#include "lib/pci.h"
98e39e09 10
727ce158 11#define PCIUTILS_VERSION PCILIB_VERSION
98e39e09 12
14d6c0a3
MM
13#if !defined(__GNUC__)
14#define __attribute__(x)
15#define inline
16#endif
17
727ce158
MM
18void __attribute__((noreturn)) die(char *msg, ...);
19void *xmalloc(unsigned int howmuch);
20int parse_generic_option(int i, struct pci_access *pacc, char *optarg);
e4842ff3 21
727ce158
MM
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
e4842ff3 50
727ce158
MM
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"