summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/compiler/asloptions.c
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-04-04 10:17:51 +0000
committerdim <dim@FreeBSD.org>2015-04-04 10:17:51 +0000
commit441da571d47ec226c5c1799fe6e9dad14931a813 (patch)
tree03ae73b5fa8cee569039a08677ba8f5db4c7032b /sys/contrib/dev/acpica/compiler/asloptions.c
parenta66c38928305566ab81042d4242432a649ec767f (diff)
downloadFreeBSD-src-441da571d47ec226c5c1799fe6e9dad14931a813.zip
FreeBSD-src-441da571d47ec226c5c1799fe6e9dad14931a813.tar.gz
MFC r272444 (by jkim):
Merge ACPICA 20140926. MFC r278970 (by jkim): Merge ACPICA 20141107 and 20150204. Approved by: jkim Relnotes: yes
Diffstat (limited to 'sys/contrib/dev/acpica/compiler/asloptions.c')
-rw-r--r--sys/contrib/dev/acpica/compiler/asloptions.c87
1 files changed, 71 insertions, 16 deletions
diff --git a/sys/contrib/dev/acpica/compiler/asloptions.c b/sys/contrib/dev/acpica/compiler/asloptions.c
index 66a9249..5868d98 100644
--- a/sys/contrib/dev/acpica/compiler/asloptions.c
+++ b/sys/contrib/dev/acpica/compiler/asloptions.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2013, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -118,8 +118,7 @@ AslCommandLine (
/* Next parameter must be the input filename */
if (!argv[AcpiGbl_Optind] &&
- !Gbl_DisasmFlag &&
- !Gbl_GetAllTables)
+ !Gbl_DisasmFlag)
{
printf ("Missing input filename\n");
BadCommandLine = TRUE;
@@ -169,7 +168,7 @@ AslDoOptions (
/* Get the command line options */
- while ((j = AcpiGetopt (argc, argv, ASL_SUPPORTED_OPTIONS)) != EOF) switch (j)
+ while ((j = AcpiGetopt (argc, argv, ASL_SUPPORTED_OPTIONS)) != ACPI_OPT_END) switch (j)
{
case '@': /* Begin a response file */
@@ -185,7 +184,7 @@ AslDoOptions (
}
break;
- case 'b': /* Debug output options */
+ case 'b': /* Debug options */
switch (AcpiGbl_Optarg[0])
{
@@ -194,10 +193,37 @@ AslDoOptions (
AslCompilerdebug = 1; /* same as yydebug */
DtParserdebug = 1;
PrParserdebug = 1;
+ Gbl_DebugFlag = TRUE;
+ break;
+
+ case 'p': /* Prune ASL parse tree */
+
+ /* Get the required argument */
+
+ if (AcpiGetoptArgument (argc, argv))
+ {
+ return (-1);
+ }
+
+ Gbl_PruneParseTree = TRUE;
+ Gbl_PruneDepth = (UINT8) strtoul (AcpiGbl_Optarg, NULL, 0);
+ break;
+
+ case 's':
+
+ Gbl_DebugFlag = TRUE;
break;
case 't':
+ /* Get the required argument */
+
+ if (AcpiGetoptArgument (argc, argv))
+ {
+ return (-1);
+ }
+
+ Gbl_PruneType = (UINT8) strtoul (AcpiGbl_Optarg, NULL, 0);
break;
default:
@@ -206,9 +232,6 @@ AslDoOptions (
return (-1);
}
- /* Produce debug output file */
-
- Gbl_DebugFlag = TRUE;
break;
case 'c':
@@ -251,6 +274,12 @@ AslDoOptions (
break;
+ case 'l': /* Use legacy ASL code (not ASL+) for disassembly */
+
+ Gbl_DoCompile = FALSE;
+ AcpiGbl_CstyleDisassembly = FALSE;
+ break;
+
default:
printf ("Unknown option: -d%s\n", AcpiGbl_Optarg);
@@ -267,11 +296,22 @@ AslDoOptions (
case 'e': /* External files for disassembler */
- Status = AcpiDmAddToExternalFileList (AcpiGbl_Optarg);
- if (ACPI_FAILURE (Status))
+ /* Get entire list of external files */
+
+ AcpiGbl_Optind--;
+ argv[AcpiGbl_Optind] = AcpiGbl_Optarg;
+
+ while (argv[AcpiGbl_Optind] &&
+ (argv[AcpiGbl_Optind][0] != '-'))
{
- printf ("Could not add %s to external list\n", AcpiGbl_Optarg);
- return (-1);
+ Status = AcpiDmAddToExternalFileList (argv[AcpiGbl_Optind]);
+ if (ACPI_FAILURE (Status))
+ {
+ printf ("Could not add %s to external list\n", argv[AcpiGbl_Optind]);
+ return (-1);
+ }
+
+ AcpiGbl_Optind++;
}
break;
@@ -308,9 +348,8 @@ AslDoOptions (
case 'g': /* Get all ACPI tables */
- Gbl_GetAllTables = TRUE;
- Gbl_DoCompile = FALSE;
- break;
+ printf ("-g option is deprecated, use acpidump utility instead\n");
+ exit (1);
case 'h':
@@ -404,6 +443,13 @@ AslDoOptions (
Gbl_PreprocessorOutputFlag = TRUE;
break;
+ case 'm':
+
+ /* Produce hardware map summary file */
+
+ Gbl_MapfileFlag = TRUE;
+ break;
+
case 'n':
/* Produce namespace file */
@@ -513,6 +559,7 @@ AslDoOptions (
case 'p': /* Override default AML output filename */
Gbl_OutputFilenamePrefix = AcpiGbl_Optarg;
+ UtConvertBackslashes (Gbl_OutputFilenamePrefix);
Gbl_UseDefaultAmlFilename = FALSE;
break;
@@ -596,11 +643,19 @@ AslDoOptions (
case 'a':
- /* Disable All error/warning messages */
+ /* Disable all error/warning/remark messages */
Gbl_NoErrors = TRUE;
break;
+ case 'e':
+
+ /* Disable all warning/remark messages (errors only) */
+
+ Gbl_DisplayRemarks = FALSE;
+ Gbl_DisplayWarnings = FALSE;
+ break;
+
case 'i':
/*
* Support for integrated development environment(s).
OpenPOWER on IntegriCloud