From def0dcd048716e293fd187e6f3e4d65d4e1e9e37 Mon Sep 17 00:00:00 2001 From: Lv Zheng Date: Mon, 23 May 2016 23:54:44 +0800 Subject: EFI/acpiexec: Add stubs for Ctrl+C signal handling Currently we do not support console termination caused by Ctrl+C for EFI environment. Lv Zheng. Signed-off-by: Lv Zheng --- source/include/platform/acenv.h | 1 + source/tools/acpiexec/aecommon.h | 2 ++ source/tools/acpiexec/aehandlers.c | 5 ++++- source/tools/acpiexec/aemain.c | 2 ++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/source/include/platform/acenv.h b/source/include/platform/acenv.h index ead8a9af0..723979ff7 100644 --- a/source/include/platform/acenv.h +++ b/source/include/platform/acenv.h @@ -426,6 +426,7 @@ #include #include #include +#include #include #endif diff --git a/source/tools/acpiexec/aecommon.h b/source/tools/acpiexec/aecommon.h index 12199b04c..502717584 100644 --- a/source/tools/acpiexec/aecommon.h +++ b/source/tools/acpiexec/aecommon.h @@ -173,9 +173,11 @@ extern ACPI_CONNECTION_INFO AeMyContext; #define OSD_PRINT(lvl,fp) TEST_OUTPUT_LEVEL(lvl) {\ AcpiOsPrintf PARAM_LIST(fp);} +#ifndef _GNU_EFI void ACPI_SYSTEM_XFACE AeCtrlCHandler ( int Sig); +#endif ACPI_STATUS AeBuildLocalTables ( diff --git a/source/tools/acpiexec/aehandlers.c b/source/tools/acpiexec/aehandlers.c index f08ffbe8e..c3d0a7db8 100644 --- a/source/tools/acpiexec/aehandlers.c +++ b/source/tools/acpiexec/aehandlers.c @@ -192,10 +192,12 @@ static char *TableEvents[] = #endif /* !ACPI_REDUCED_HARDWARE */ -static UINT32 SigintCount = 0; static AE_DEBUG_REGIONS AeRegions; +#ifndef _GNU_EFI +static UINT32 SigintCount = 0; + /****************************************************************************** * * FUNCTION: AeCtrlCHandler @@ -232,6 +234,7 @@ AeCtrlCHandler ( (void) AcpiOsTerminate (); exit (0); } +#endif /****************************************************************************** diff --git a/source/tools/acpiexec/aemain.c b/source/tools/acpiexec/aemain.c index 90b6cfc5b..f6929e191 100644 --- a/source/tools/acpiexec/aemain.c +++ b/source/tools/acpiexec/aemain.c @@ -530,7 +530,9 @@ main ( ACPI_DEBUG_INITIALIZE (); /* For debug version only */ +#ifndef _GNU_EFI signal (SIGINT, AeCtrlCHandler); +#endif /* Init debug globals */ -- cgit v1.2.1