[PATCH 2/3] uefirttime: print out the return status and description when errors occur
Ivan Hu
ivan.hu at canonical.com
Fri Dec 14 09:49:45 UTC 2012
When errors occur for UEFI runtime service interface, print out the useful
reports to user.
Signed-off-by: Ivan Hu <ivan.hu at canonical.com>
---
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;
}
--
1.7.10.4
More information about the fwts-devel
mailing list