From 6add52f5de13f9e29cc0f70e6c08a38b2347a6ed Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Mon, 11 Feb 2008 21:14:40 +0100 Subject: [PATCH] Cleaned up the list of options. --- ChangeLog | 2 ++ lspci.c | 40 +++++++++++++++++++--------------------- setpci.c | 8 ++++---- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/ChangeLog b/ChangeLog index 20df7a6..442d805 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2008-02-11 Martin Mares + * lspci.c, setpci.c: Cleaned up the list of options. + * lib/names.c: Fix displaying of errors reported by zlib. Previously, the buffer containing the error message had been deallocated by gzclose() before the message was printed. diff --git a/lspci.c b/lspci.c index 3110ea0..3d981ba 100644 --- a/lspci.c +++ b/lspci.c @@ -31,29 +31,27 @@ const char program_name[] = "lspci"; static char options[] = "nvbxs:d:ti:mgp:kMD" GENERIC_OPTIONS ; -static char help_msg[] = "\ -Usage: lspci []\n\ -\n\ --v\t\tBe verbose\n\ --n\t\tShow numeric ID's\n\ --nn\t\tShow both textual and numeric ID's (names & numbers)\n\ --b\t\tBus-centric view (PCI addresses and IRQ's instead of those seen by the CPU)\n\ --x\t\tShow hex-dump of the standard portion of config space\n\ --xxx\t\tShow hex-dump of the whole config space (dangerous; root only)\n\ --xxxx\t\tShow hex-dump of the 4096-byte extended config space (root only)\n\ --s [[[[]:]]:][][.[]]\tShow only devices in selected slots\n\ --d []:[]\tShow only selected devices\n\ --t\t\tShow bus tree\n\ --m\t\tProduce machine-readable output\n\ --i \tUse specified ID database instead of %s\n" +static char help_msg[] = +"Usage: lspci []\n" +"\n" +"-v\t\tBe verbose\n" +"-n\t\tShow numeric ID's\n" +"-nn\t\tShow both textual and numeric ID's (names & numbers)\n" +"-b\t\tBus-centric view (PCI addresses and IRQ's instead of those seen by the CPU)\n" +"-x\t\tShow hex-dump of the standard portion of config space\n" +"-xxx\t\tShow hex-dump of the whole config space (dangerous; root only)\n" +"-xxxx\t\tShow hex-dump of the 4096-byte extended config space (root only)\n" +"-s [[[[]:]]:][][.[]]\tShow only devices in selected slots\n" +"-d []:[]\tShow only selected devices\n" +"-t\t\tShow bus tree\n" +"-m\t\tProduce machine-readable output\n" +"-i \tUse specified ID database instead of %s\n" #ifdef PCI_OS_LINUX -"\ --k\t\tShow kernel drivers handling each device\n\ --p \tLook up kernel modules in a given file instead of default modules.pcimap\n" +"-k\t\tShow kernel drivers handling each device\n" +"-p \tLook up kernel modules in a given file instead of default modules.pcimap\n" #endif -"\ --D\t\tAlways show domain numbers\n\ --M\t\tEnable `bus mapping' mode (dangerous; root only)\n" +"-D\t\tAlways show domain numbers\n" +"-M\t\tEnable `bus mapping' mode (dangerous; root only)\n" GENERIC_HELP ; diff --git a/setpci.c b/setpci.c index 8f2841c..fc10c1d 100644 --- a/setpci.c +++ b/setpci.c @@ -258,10 +258,10 @@ usage(char *msg, ...) fprintf(stderr, "\n\n"); } fprintf(stderr, -"Usage: setpci [] (+ [=]*)*\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 [] (+ [=]*)*\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" GENERIC_HELP ":\t-s [[[]:][]:][][.[]]\n" "\t|\t-d []:[]\n" -- 2.39.5