summaryrefslogtreecommitdiff
path: root/source/tools
diff options
context:
space:
mode:
authorRobert Moore <Robert.Moore@intel.com>2013-07-31 08:44:50 -0700
committerRobert Moore <Robert.Moore@intel.com>2013-07-31 08:44:50 -0700
commitb8999a8916c82bed79d076a68cea20f6a7a63436 (patch)
treed303d0443f7f1146119bc1ee032e9a2fef5a8e14 /source/tools
parentfbf126e7f6c71fa1f1a5b8152c00fa9a1cdd3101 (diff)
Utilities: Standardize -v option for all user-space tools.
Ensure -v is supported in all of the tools, in an identical manner. Also cleans up and standardizes the format of the utility names and supported option strings.
Diffstat (limited to 'source/tools')
-rw-r--r--source/tools/acpibin/abmain.c25
-rw-r--r--source/tools/acpidump/apmain.c2
-rw-r--r--source/tools/acpiexec/aemain.c10
-rw-r--r--source/tools/acpihelp/ahmain.c12
-rw-r--r--source/tools/acpinames/anmain.c12
-rw-r--r--source/tools/acpisrc/asmain.c30
-rw-r--r--source/tools/acpixtract/axmain.c12
7 files changed, 80 insertions, 23 deletions
diff --git a/source/tools/acpibin/abmain.c b/source/tools/acpibin/abmain.c
index 035eb8890..9bca49736 100644
--- a/source/tools/acpibin/abmain.c
+++ b/source/tools/acpibin/abmain.c
@@ -125,6 +125,10 @@ AbDisplayUsage (
UINT8 OptionCount);
+#define AB_UTILITY_NAME "ACPI Binary Table Dump Utility"
+#define AB_SUPPORTED_OPTIONS "c:d:e:h:s:tv"
+
+
/******************************************************************************
*
* FUNCTION: AbDisplayUsage
@@ -145,12 +149,13 @@ AbDisplayUsage (
ACPI_USAGE_HEADER ("acpibin [options]");
- ACPI_OPTION ("-c <File1><File2>", "Compare two binary AML files");
- ACPI_OPTION ("-d <In><Out>", "Dump AML binary to text file");
- ACPI_OPTION ("-e <Sig><In><Out>", "Extract binary AML table from AcpiDump file");
- ACPI_OPTION ("-h <File>", "Display table header for binary AML file");
- ACPI_OPTION ("-s <File>", "Update checksum for binary AML file");
- ACPI_OPTION ("-t", "Terse mode");
+ ACPI_OPTION ("-c <File1><File2>", "Compare two binary AML files");
+ ACPI_OPTION ("-d <In><Out>", "Dump AML binary to text file");
+ ACPI_OPTION ("-e <Sig><In><Out>", "Extract binary AML table from AcpiDump file");
+ ACPI_OPTION ("-h <File>", "Display table header for binary AML file");
+ ACPI_OPTION ("-s <File>", "Update checksum for binary AML file");
+ ACPI_OPTION ("-t", "Terse mode");
+ ACPI_OPTION ("-v", "Display version information");
}
@@ -177,7 +182,7 @@ main (
AcpiGbl_DbOutputFlags = DB_CONSOLE_OUTPUT;
AcpiOsInitialize ();
- printf (ACPI_COMMON_SIGNON ("ACPI Binary AML File Utility"));
+ printf (ACPI_COMMON_SIGNON (AB_UTILITY_NAME));
if (argc < 2)
{
@@ -187,7 +192,7 @@ main (
/* Command line options */
- while ((j = AcpiGetopt (argc, argv, "c:d:e:h:s:t")) != EOF) switch(j)
+ while ((j = AcpiGetopt (argc, argv, AB_SUPPORTED_OPTIONS)) != EOF) switch(j)
{
case 'c': /* Compare Files */
@@ -250,6 +255,10 @@ main (
Gbl_TerseMode = TRUE;
break;
+ case 'v': /* -v: (Version): signon already emitted, just exit */
+
+ return (0);
+
default:
AbDisplayUsage (0);
diff --git a/source/tools/acpidump/apmain.c b/source/tools/acpidump/apmain.c
index 3eef5086d..fa4cc5e76 100644
--- a/source/tools/acpidump/apmain.c
+++ b/source/tools/acpidump/apmain.c
@@ -186,7 +186,7 @@ ApDisplayUsage (
ACPI_OPTION ("-h -?", "This help message");
ACPI_OPTION ("-o <File>", "Redirect output to file");
ACPI_OPTION ("-s", "Print table summaries only");
- ACPI_OPTION ("-v", "Version of this utility");
+ ACPI_OPTION ("-v", "Display version information");
ACPI_OPTION ("-z", "Verbose mode");
printf ("\nTable Options:\n");
diff --git a/source/tools/acpiexec/aemain.c b/source/tools/acpiexec/aemain.c
index c0d00bb4e..f9facc5cc 100644
--- a/source/tools/acpiexec/aemain.c
+++ b/source/tools/acpiexec/aemain.c
@@ -163,7 +163,8 @@ static char BatchBuffer[AE_BUFFER_SIZE]; /* Batch command buf
static char *FileList[ASL_MAX_FILES];
static AE_TABLE_DESC *AeTableListHead = NULL;
-#define AE_SUPPORTED_OPTIONS "?b:d:e:f:ghm^orv:x:"
+#define ACPIEXEC_NAME "AML Execution/Debug Utility"
+#define AE_SUPPORTED_OPTIONS "?b:d:e:f:ghm^orv^:x:"
/******************************************************************************
@@ -206,6 +207,7 @@ usage (
ACPI_OPTION ("-f <Value>", "Operation Region initialization fill value");
ACPI_OPTION ("-r", "Use hardware-reduced FADT V5");
+ ACPI_OPTION ("-v", "Display version information");
ACPI_OPTION ("-vi", "Verbose initialization output");
ACPI_OPTION ("-vr", "Verbose region handler output");
ACPI_OPTION ("-x <DebugLevel>", "Debug output level");
@@ -374,6 +376,10 @@ AeDoOptions (
switch (AcpiGbl_Optarg[0])
{
+ case '^': /* -v: (Version): signon already emitted, just exit */
+
+ exit (0);
+
case 'i':
AcpiDbgLevel |= ACPI_LV_INIT_NAMES;
@@ -438,7 +444,7 @@ main (
ACPI_DEBUG_INITIALIZE (); /* For debug version only */
- printf (ACPI_COMMON_SIGNON ("AML Execution/Debug Utility"));
+ printf (ACPI_COMMON_SIGNON (ACPIEXEC_NAME));
if (argc < 2)
{
usage ();
diff --git a/source/tools/acpihelp/ahmain.c b/source/tools/acpihelp/ahmain.c
index c0befb489..f2d50bd7a 100644
--- a/source/tools/acpihelp/ahmain.c
+++ b/source/tools/acpihelp/ahmain.c
@@ -122,6 +122,9 @@ static void
AhDisplayUsage (
void);
+#define AH_UTILITY_NAME "ACPI Help Utility"
+#define AH_SUPPORTED_OPTIONS "ehikmopsv"
+
/******************************************************************************
*
@@ -138,6 +141,7 @@ AhDisplayUsage (
ACPI_USAGE_HEADER ("acpihelp <options> [NamePrefix | HexValue]");
ACPI_OPTION ("-h", "Display help");
+ ACPI_OPTION ("-v", "Display version information");
printf ("\nACPI Names and Symbols:\n");
ACPI_OPTION ("-k [NamePrefix]", "Find/Display ASL non-operator keyword(s)");
@@ -176,7 +180,7 @@ main (
ACPI_DEBUG_INITIALIZE (); /* For debug version only */
- printf (ACPI_COMMON_SIGNON ("ACPI Help Utility"));
+ printf (ACPI_COMMON_SIGNON (AH_UTILITY_NAME));
DecodeType = AH_DECODE_DEFAULT;
if (argc < 2)
@@ -187,7 +191,7 @@ main (
/* Command line options */
- while ((j = AcpiGetopt (argc, argv, "ehikmops")) != EOF) switch (j)
+ while ((j = AcpiGetopt (argc, argv, AH_SUPPORTED_OPTIONS)) != EOF) switch (j)
{
case 'e':
@@ -224,6 +228,10 @@ main (
DecodeType = AH_DECODE_ASL;
break;
+ case 'v': /* -v: (Version): signon already emitted, just exit */
+
+ return (0);
+
case 'h':
default:
diff --git a/source/tools/acpinames/anmain.c b/source/tools/acpinames/anmain.c
index bd29840e6..a1944cfe1 100644
--- a/source/tools/acpinames/anmain.c
+++ b/source/tools/acpinames/anmain.c
@@ -125,7 +125,8 @@ FILE *AcpiGbl_DebugFile;
static AE_TABLE_DESC *AeTableListHead = NULL;
-#define AE_SUPPORTED_OPTIONS "?h"
+#define AN_UTILITY_NAME "ACPI Namespace Dump Utility"
+#define AN_SUPPORTED_OPTIONS "?hv"
/******************************************************************************
@@ -147,6 +148,7 @@ usage (
ACPI_USAGE_HEADER ("AcpiNames [options] AMLfile");
ACPI_OPTION ("-?", "Display this message");
+ ACPI_OPTION ("-v", "Display version information");
}
@@ -312,7 +314,7 @@ main (
ACPI_DEBUG_INITIALIZE (); /* For debug version only */
- printf (ACPI_COMMON_SIGNON ("ACPI Namespace Dump Utility"));
+ printf (ACPI_COMMON_SIGNON (AN_UTILITY_NAME));
if (argc < 2)
{
@@ -330,8 +332,12 @@ main (
/* Get the command line options */
- while ((j = AcpiGetopt (argc, argv, AE_SUPPORTED_OPTIONS)) != EOF) switch(j)
+ while ((j = AcpiGetopt (argc, argv, AN_SUPPORTED_OPTIONS)) != EOF) switch(j)
{
+ case 'v': /* -v: (Version): signon already emitted, just exit */
+
+ return (0);
+
case '?':
case 'h':
default:
diff --git a/source/tools/acpisrc/asmain.c b/source/tools/acpisrc/asmain.c
index 31dba6a06..46fb13dc1 100644
--- a/source/tools/acpisrc/asmain.c
+++ b/source/tools/acpisrc/asmain.c
@@ -170,6 +170,9 @@ BOOLEAN Gbl_IgnoreLoneLineFeeds = FALSE;
BOOLEAN Gbl_HasLoneLineFeeds = FALSE;
BOOLEAN Gbl_Cleanup = FALSE;
+#define AS_UTILITY_NAME "ACPI Source Code Conversion Utility"
+#define AS_SUPPORTED_OPTIONS "cdhlqsuv^y"
+
/******************************************************************************
*
@@ -367,7 +370,8 @@ AsDisplayUsage (
printf ("\n");
ACPI_OPTION ("-d", "Leave debug statements in code");
ACPI_OPTION ("-s", "Generate source statistics only");
- ACPI_OPTION ("-v", "Verbose mode");
+ ACPI_OPTION ("-v", "Display version information");
+ ACPI_OPTION ("-vb", "Verbose mode");
ACPI_OPTION ("-y", "Suppress file overwrite prompts");
}
@@ -393,7 +397,7 @@ main (
ACPI_DEBUG_INITIALIZE (); /* For debug version only */
- printf (ACPI_COMMON_SIGNON ("ACPI Source Code Conversion Utility"));
+ printf (ACPI_COMMON_SIGNON (AS_UTILITY_NAME));
if (argc < 2)
{
@@ -403,7 +407,7 @@ main (
/* Command line options */
- while ((j = AcpiGetopt (argc, argv, "cdhlqsuvy")) != EOF) switch(j)
+ while ((j = AcpiGetopt (argc, argv, AS_SUPPORTED_OPTIONS)) != EOF) switch(j)
{
case 'l':
@@ -448,9 +452,25 @@ main (
case 'v':
- /* Verbose mode */
+ switch (AcpiGbl_Optarg[0])
+ {
+ case '^': /* -v: (Version): signon already emitted, just exit */
+
+ exit (0);
+
+ case 'b':
+
+ /* Verbose mode */
+
+ Gbl_VerboseMode = TRUE;
+ break;
+
+ default:
+
+ printf ("Unknown option: -v%s\n", AcpiGbl_Optarg);
+ return (-1);
+ }
- Gbl_VerboseMode = TRUE;
break;
case 'y':
diff --git a/source/tools/acpixtract/axmain.c b/source/tools/acpixtract/axmain.c
index 716d26bc4..04941a6cd 100644
--- a/source/tools/acpixtract/axmain.c
+++ b/source/tools/acpixtract/axmain.c
@@ -146,6 +146,9 @@ static int AxAction = AX_EXTRACT_AML_TABLES; /* DSDT & SSDTs */
#define AX_OPTIONAL_TABLES 0
#define AX_REQUIRED_TABLE 1
+#define AX_UTILITY_NAME "ACPI Binary Table Extraction Utility"
+#define AX_SUPPORTED_OPTIONS "ahls:v"
+
/******************************************************************************
*
@@ -165,6 +168,7 @@ DisplayUsage (
ACPI_OPTION ("-a", "Extract all tables, not just DSDT/SSDT");
ACPI_OPTION ("-l", "List table summaries, do not extract");
ACPI_OPTION ("-s <signature>", "Extract all tables with <signature>");
+ ACPI_OPTION ("-v", "Display version information");
printf ("\nExtract binary ACPI tables from text acpidump output\n");
printf ("Default invocation extracts the DSDT and all SSDTs\n");
@@ -190,7 +194,7 @@ main (
ACPI_DEBUG_INITIALIZE (); /* For debug version only */
- printf (ACPI_COMMON_SIGNON ("ACPI Binary Table Extraction Utility"));
+ printf (ACPI_COMMON_SIGNON (AX_UTILITY_NAME));
if (argc < 2)
{
@@ -200,7 +204,7 @@ main (
/* Command line options */
- while ((j = AcpiGetopt (argc, argv, "ahls:")) != EOF) switch (j)
+ while ((j = AcpiGetopt (argc, argv, AX_SUPPORTED_OPTIONS)) != EOF) switch (j)
{
case 'a':
@@ -217,6 +221,10 @@ main (
AxAction = AX_EXTRACT_SIGNATURE; /* Extract only tables with this sig */
break;
+ case 'v': /* -v: (Version): signon already emitted, just exit */
+
+ return (0);
+
case 'h':
default: