summaryrefslogtreecommitdiff
path: root/source/tools/acpiexec/aemain.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/tools/acpiexec/aemain.c')
-rw-r--r--source/tools/acpiexec/aemain.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/source/tools/acpiexec/aemain.c b/source/tools/acpiexec/aemain.c
index 6e839e9a27dc..861cb49bae75 100644
--- a/source/tools/acpiexec/aemain.c
+++ b/source/tools/acpiexec/aemain.c
@@ -336,7 +336,7 @@ AeDoOptions (
case '?':
usage();
- return (0);
+ return (1);
case 'i':
@@ -344,7 +344,7 @@ AeDoOptions (
if (!Temp || (Temp > ACPI_UINT16_MAX))
{
printf ("%s: Invalid max loops value\n", AcpiGbl_Optarg);
- return (1);
+ return (-1);
}
AcpiGbl_MaxLoopIterations = (UINT16) Temp;
@@ -387,7 +387,7 @@ AeDoOptions (
case '^': /* -v: (Version): signon already emitted, just exit */
(void) AcpiOsTerminate ();
- exit (0);
+ return (1);
case 'i':
@@ -445,6 +445,7 @@ main (
ACPI_TABLE_HEADER *Table = NULL;
UINT32 TableCount;
AE_TABLE_DESC *TableDesc;
+ int ExitCode = 0;
ACPI_DEBUG_INITIALIZE (); /* For debug version only */
@@ -488,8 +489,13 @@ main (
/* Get the command line options */
- if (AeDoOptions (argc, argv))
+ ExitCode = AeDoOptions (argc, argv);
+ if (ExitCode)
{
+ if (ExitCode > 0)
+ {
+ ExitCode = 0;
+ }
goto ErrorExit;
}
@@ -660,7 +666,7 @@ EnterDebugger:
ErrorExit:
(void) AcpiOsTerminate ();
- return (-1);
+ return (ExitCode);
}