/*
- * Linux PCI Utilities -- Manipulate PCI Configuration Registers
+ * The PCI Utilities -- Manipulate PCI Configuration Registers
*
- * Copyright (c) 1998--2003 Martin Mares <mj@ucw.cz>
+ * Copyright (c) 1998--2006 Martin Mares <mj@ucw.cz>
*
* Can be freely distributed and used under the terms of the GNU GPL.
*/
static int verbose; /* Verbosity level */
static int demo_mode; /* Only show */
+const char program_name[] = "setpci";
+
static struct pci_access *pacc;
struct value {
-v\t\tBe verbose\n\
-D\t\tList changes, don't commit them\n"
GENERIC_HELP
-"<device>:\t-s [[<bus>]:][<slot>][.[<func>]]\n"
+"<device>:\t-s [[[<domain>]:][<bus>]:][<slot>][.[<func>]]\n"
"\t|\t-d [<vendor>]:[<device>]\n"
"<reg>:\t\t<number>[.(B|W|L)]\n"
" |\t\t<name>\n"
case 'L':
op->width = 4; break;
default:
- usage("Invalid width \"%s\"", *e);
+ usage("Invalid width \"%c\"", *e);
}
}
else
ll = r->offset;
op->width = r->width;
}
- if (ll > 0x100 || ll + op->width*((n < 0) ? 1 : n) > 0x100)
+ if (ll > 0x1000 || ll + op->width*((n < 0) ? 1 : n) > 0x1000)
die("Register number out of range!");
if (ll & (op->width - 1))
die("Unaligned register address!");