From patchwork Fri Dec 14 09:49:45 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [2/3] uefirttime: print out the return status and description when errors occur Date: Thu, 13 Dec 2012 23:49:45 -0000 From: IvanHu X-Patchwork-Id: 206379 Message-Id: <1355478585-25430-1-git-send-email-ivan.hu@canonical.com> To: fwts-devel@lists.ubuntu.com When errors occur for UEFI runtime service interface, print out the useful reports to user. Signed-off-by: Ivan Hu Acked-by: Colin Ian King Acked-by: Alex Hung --- src/uefi/uefirttime/uefirttime.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/uefi/uefirttime/uefirttime.c b/src/uefi/uefirttime/uefirttime.c index e557619..78b5a3b 100644 --- a/src/uefi/uefirttime/uefirttime.c +++ b/src/uefi/uefirttime/uefirttime.c @@ -212,6 +212,7 @@ static int uefirttime_test1(fwts_framework *fw) if (ioret == -1) { fwts_failed(fw, LOG_LEVEL_HIGH, "UEFIRuntimeGetTime", "Failed to get time with UEFI runtime service."); + fwts_uefi_print_status_info(fw, status); return FWTS_ERROR; } @@ -244,6 +245,7 @@ static int uefirttime_test2(fwts_framework *fw) if (ioret == -1) { fwts_failed(fw, LOG_LEVEL_HIGH, "UEFIRuntimeGetTime", "Failed to get time with UEFI runtime service."); + fwts_uefi_print_status_info(fw, status); return FWTS_ERROR; } @@ -280,6 +282,7 @@ static int uefirttime_test2(fwts_framework *fw) if (ioret == -1) { fwts_failed(fw, LOG_LEVEL_HIGH, "UEFIRuntimeSetTime", "Failed to set time with UEFI runtime service."); + fwts_uefi_print_status_info(fw, status); return FWTS_ERROR; } @@ -292,6 +295,7 @@ static int uefirttime_test2(fwts_framework *fw) if (ioret == -1) { fwts_failed(fw, LOG_LEVEL_HIGH, "UEFIRuntimeGetTime", "Failed to get time with UEFI runtime service."); + fwts_uefi_print_status_info(fw, status); return FWTS_ERROR; } @@ -331,6 +335,7 @@ static int uefirttime_test2(fwts_framework *fw) if (ioret == -1) { fwts_failed(fw, LOG_LEVEL_HIGH, "UEFIRuntimeSetTime", "Failed to set time with UEFI runtime service."); + fwts_uefi_print_status_info(fw, status); return FWTS_ERROR; } @@ -356,6 +361,7 @@ static int uefirttime_test3(fwts_framework *fw) if (ioret == -1) { fwts_failed(fw, LOG_LEVEL_HIGH, "UEFIRuntimeGetWakeupTime", "Failed to get wakeup time with UEFI runtime service."); + fwts_uefi_print_status_info(fw, status); return FWTS_ERROR; } @@ -391,6 +397,7 @@ static int uefirttime_test4(fwts_framework *fw) if (ioret == -1) { fwts_failed(fw, LOG_LEVEL_HIGH, "UEFIRuntimeGetTime", "Failed to get time with UEFI runtime service."); + fwts_uefi_print_status_info(fw, status); return FWTS_ERROR; } @@ -405,6 +412,7 @@ static int uefirttime_test4(fwts_framework *fw) if (ioret == -1) { fwts_failed(fw, LOG_LEVEL_HIGH, "UEFIRuntimeSetWakeupTime", "Failed to set wakeup time with UEFI runtime service."); + fwts_uefi_print_status_info(fw, status); return FWTS_ERROR; } @@ -419,6 +427,7 @@ static int uefirttime_test4(fwts_framework *fw) if (ioret == -1) { fwts_failed(fw, LOG_LEVEL_HIGH, "UEFIRuntimeGetWakeupTime", "Failed to get wakeup time with UEFI runtime service."); + fwts_uefi_print_status_info(fw, status); return FWTS_ERROR; } @@ -447,6 +456,7 @@ static int uefirttime_test4(fwts_framework *fw) if (ioret == -1) { fwts_failed(fw, LOG_LEVEL_HIGH, "UEFIRuntimeSetWakeupTime", "Failed to set wakeup time with UEFI runtime service."); + fwts_uefi_print_status_info(fw, status); return FWTS_ERROR; } @@ -456,6 +466,7 @@ static int uefirttime_test4(fwts_framework *fw) if (ioret == -1) { fwts_failed(fw, LOG_LEVEL_HIGH, "UEFIRuntimeGetWakeupTime", "Failed to get wakeup time with UEFI runtime service."); + fwts_uefi_print_status_info(fw, status); return FWTS_ERROR; }