X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=setpci.c;h=8f2841c6529a046a59875d1a4fc2fcd9cee40b98;hb=dc01dd60affb4688453f8b7204af66246f0850db;hp=c6b3cc008f26dd24fe0fb21294c0d5ff33e2ffca;hpb=b251f40bc2c49892eee8827ef108695f3995ecd9;p=pciutils.git diff --git a/setpci.c b/setpci.c index c6b3cc0..8f2841c 100644 --- a/setpci.c +++ b/setpci.c @@ -1,7 +1,7 @@ /* - * Linux PCI Utilities -- Manipulate PCI Configuration Registers + * The PCI Utilities -- Manipulate PCI Configuration Registers * - * Copyright (c) 1998--2003 Martin Mares + * Copyright (c) 1998--2006 Martin Mares * * Can be freely distributed and used under the terms of the GNU GPL. */ @@ -18,6 +18,8 @@ static int force; /* Don't complain if no devices match */ static int verbose; /* Verbosity level */ static int demo_mode; /* Only show */ +const char program_name[] = "setpci"; + static struct pci_access *pacc; struct value { @@ -261,7 +263,7 @@ usage(char *msg, ...) -v\t\tBe verbose\n\ -D\t\tList changes, don't commit them\n" GENERIC_HELP -":\t-s [[]:][][.[]]\n" +":\t-s [[[]:][]:][][.[]]\n" "\t|\t-d []:[]\n" ":\t\t[.(B|W|L)]\n" " |\t\t\n" @@ -435,7 +437,7 @@ next: case 'L': op->width = 4; break; default: - usage("Invalid width \"%s\"", *e); + usage("Invalid width \"%c\"", *e); } } else @@ -454,7 +456,7 @@ next: 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!");