summaryrefslogtreecommitdiff
path: root/setpci.c
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2008-02-20 12:18:19 +0100
committerMartin Mares <mj@ucw.cz>2008-02-20 12:18:19 +0100
commita2bf30a4fd407c55e8172e2f6fd158725ccb90b6 (patch)
tree971b143dc78a2b88ac43e01e2914ba23b95fcd57 /setpci.c
parentdaf1afbf693d83566863e6dc5447e0bebdd1c679 (diff)
parent4d59f9e543c291e1454c638e32cbe94af66b11b8 (diff)
downloadpciutils-a2bf30a4fd407c55e8172e2f6fd158725ccb90b6.tar.gz
Merge with git+ssh://git.ucw.cz/home/mj/GIT/pciutils.git#networknetwork
Diffstat (limited to 'setpci.c')
-rw-r--r--setpci.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/setpci.c b/setpci.c
index 8f2841c..3ebbaee 100644
--- a/setpci.c
+++ b/setpci.c
@@ -1,7 +1,7 @@
/*
* The PCI Utilities -- Manipulate PCI Configuration Registers
*
- * Copyright (c) 1998--2006 Martin Mares <mj@ucw.cz>
+ * Copyright (c) 1998--2008 Martin Mares <mj@ucw.cz>
*
* Can be freely distributed and used under the terms of the GNU GPL.
*/
@@ -12,6 +12,7 @@
#include <stdarg.h>
#include <unistd.h>
+#define PCIUTILS_SETPCI
#include "pciutils.h"
static int force; /* Don't complain if no devices match */
@@ -246,7 +247,7 @@ static const struct reg_name pci_reg_names[] = {
{ 0x00, 0, NULL }
};
-static void NONRET
+static void NONRET PCI_PRINTF(1,2)
usage(char *msg, ...)
{
va_list args;
@@ -258,11 +259,17 @@ usage(char *msg, ...)
fprintf(stderr, "\n\n");
}
fprintf(stderr,
-"Usage: setpci [<options>] (<device>+ <reg>[=<values>]*)*\n\
--f\t\tDon't complain if there's nothing to do\n\
--v\t\tBe verbose\n\
--D\t\tList changes, don't commit them\n"
+"Usage: setpci [<options>] (<device>+ <reg>[=<values>]*)*\n"
+"\n"
+"General options:\n"
+"-f\t\tDon't complain if there's nothing to do\n"
+"-v\t\tBe verbose\n"
+"-D\t\tList changes, don't commit them\n"
+"\n"
+"PCI access options:\n"
GENERIC_HELP
+"\n"
+"Setting commands:\n"
"<device>:\t-s [[[<domain>]:][<bus>]:][<slot>][.[<func>]]\n"
"\t|\t-d [<vendor>]:[<device>]\n"
"<reg>:\t\t<number>[.(B|W|L)]\n"