[PATCH 1/2] uefi: remove the var_ prefix
Ivan Hu
ivan.hu at canonical.com
Fri Mar 12 11:30:14 UTC 2021
RuntimeServicesSupported is no longer from UEFI global variable.
No function changed.
Signed-off-by: Ivan Hu <ivan.hu at canonical.com>
---
src/lib/include/fwts_uefi.h | 3 +--
src/lib/src/fwts_uefi.c | 6 ++---
src/uefi/uefirtmisc/uefirtmisc.c | 10 ++++-----
src/uefi/uefirttime/uefirttime.c | 28 ++++++++++++------------
src/uefi/uefirtvariable/uefirtvariable.c | 28 ++++++++++++------------
5 files changed, 37 insertions(+), 38 deletions(-)
diff --git a/src/lib/include/fwts_uefi.h b/src/lib/include/fwts_uefi.h
index 527254cf..8d7a711b 100644
--- a/src/lib/include/fwts_uefi.h
+++ b/src/lib/include/fwts_uefi.h
@@ -682,8 +682,7 @@ char *fwts_uefi_attribute_info(uint32_t attr);
bool fwts_uefi_efivars_iface_exist(void);
-void fwts_uefi_rt_support_status_get(int fd, bool *have_rtsupported, uint32_t *var_rtsupported);
-
+void fwts_uefi_rt_support_status_get(int fd, bool *have_rtsupported, uint32_t *rtservicessupported);
PRAGMA_POP
#endif
diff --git a/src/lib/src/fwts_uefi.c b/src/lib/src/fwts_uefi.c
index f7edadcb..138f1164 100644
--- a/src/lib/src/fwts_uefi.c
+++ b/src/lib/src/fwts_uefi.c
@@ -550,14 +550,14 @@ bool fwts_uefi_efivars_iface_exist(void)
* this bitmask can be read via an IOCTL call. Before Linux 5.11 the value
* cannot be determined.
*/
-void fwts_uefi_rt_support_status_get(int fd, bool *have_rtsupported, uint32_t *var_rtsupported)
+void fwts_uefi_rt_support_status_get(int fd, bool *have_rtsupported, uint32_t *rtservicessupported)
{
long ioret;
- ioret = ioctl(fd, EFI_RUNTIME_GET_SUPPORTED_MASK, var_rtsupported);
+ ioret = ioctl(fd, EFI_RUNTIME_GET_SUPPORTED_MASK, rtservicessupported);
if (ioret == -1) {
*have_rtsupported = false;
- *var_rtsupported = EFI_RT_SUPPORTED_ALL;
+ *rtservicessupported = EFI_RT_SUPPORTED_ALL;
} else {
*have_rtsupported = true;
}
diff --git a/src/uefi/uefirtmisc/uefirtmisc.c b/src/uefi/uefirtmisc/uefirtmisc.c
index f23562e1..835cec34 100644
--- a/src/uefi/uefirtmisc/uefirtmisc.c
+++ b/src/uefi/uefirtmisc/uefirtmisc.c
@@ -248,13 +248,13 @@ static int uefirtmisc_test4(fwts_framework *fw)
long ioret;
uint64_t status;
bool have_rtsupported;
- uint32_t var_runtimeservicessupported;
+ uint32_t runtimeservicessupported;
struct efi_getnexthighmonotoniccount getnexthighmonotoniccount;
uint32_t highcount;
fwts_uefi_rt_support_status_get(fd, &have_rtsupported,
- &var_runtimeservicessupported);
+ &runtimeservicessupported);
if (!have_rtsupported) {
fwts_skipped(fw, "Cannot get the RuntimeServicesSupported "
"mask from the kernel. This IOCTL was "
@@ -268,7 +268,7 @@ static int uefirtmisc_test4(fwts_framework *fw)
ioret = ioctl(fd, EFI_RUNTIME_GET_NEXTHIGHMONOTONICCOUNT, &getnexthighmonotoniccount);
if (ioret == -1) {
if (status == EFI_UNSUPPORTED) {
- if (var_runtimeservicessupported & EFI_RT_SUPPORTED_GET_NEXT_HIGH_MONOTONIC_COUNT) {
+ if (runtimeservicessupported & EFI_RT_SUPPORTED_GET_NEXT_HIGH_MONOTONIC_COUNT) {
fwts_failed(fw, LOG_LEVEL_HIGH,
"UEFIRuntimeGetNextHighMonotonicCount",
"Get the GetNextHighMonotonicCount runtime "
@@ -284,7 +284,7 @@ static int uefirtmisc_test4(fwts_framework *fw)
fwts_skipped(fw, "Unknown error occurred, skip test.");
return FWTS_SKIP;
}
- if (var_runtimeservicessupported & EFI_RT_SUPPORTED_GET_NEXT_HIGH_MONOTONIC_COUNT) {
+ if (runtimeservicessupported & EFI_RT_SUPPORTED_GET_NEXT_HIGH_MONOTONIC_COUNT) {
fwts_passed(fw, "UEFI GetNextHighMonotonicCount runtime "
"service supported status test passed.");
} else {
@@ -300,7 +300,7 @@ static int uefirtmisc_test4(fwts_framework *fw)
fwts_skipped(fw, "Unknown error occurred, skip test.");
return FWTS_SKIP;
}
- if (var_runtimeservicessupported & EFI_RT_SUPPORTED_GET_NEXT_HIGH_MONOTONIC_COUNT) {
+ if (runtimeservicessupported & EFI_RT_SUPPORTED_GET_NEXT_HIGH_MONOTONIC_COUNT) {
fwts_passed(fw, "UEFI GetNextHighMonotonicCount runtime "
"service supported status test passed.");
} else {
diff --git a/src/uefi/uefirttime/uefirttime.c b/src/uefi/uefirttime/uefirttime.c
index c6107d61..72667e35 100644
--- a/src/uefi/uefirttime/uefirttime.c
+++ b/src/uefi/uefirttime/uefirttime.c
@@ -1143,7 +1143,7 @@ static int uefirttime_test38(fwts_framework *fw)
{
long ioret;
bool have_rtsupported;
- uint32_t var_runtimeservicessupported;
+ uint32_t runtimeservicessupported;
struct efi_settime settime;
uint64_t status = ~0ULL;
@@ -1156,7 +1156,7 @@ static int uefirttime_test38(fwts_framework *fw)
EFI_TIME_CAPABILITIES efi_time_cap;
fwts_uefi_rt_support_status_get(fd, &have_rtsupported,
- &var_runtimeservicessupported);
+ &runtimeservicessupported);
if (!have_rtsupported) {
fwts_skipped(fw, "Cannot get the RuntimeServicesSupported "
@@ -1171,7 +1171,7 @@ static int uefirttime_test38(fwts_framework *fw)
ioret = ioctl(fd, EFI_RUNTIME_GET_TIME, &gettime);
if (ioret == -1) {
if (status == EFI_UNSUPPORTED) {
- if (var_runtimeservicessupported & EFI_RT_SUPPORTED_GET_TIME) {
+ if (runtimeservicessupported & EFI_RT_SUPPORTED_GET_TIME) {
fwts_failed(fw, LOG_LEVEL_HIGH, "UEFIRuntimeGetTime",
"Get the GetTime runtime service supported "
"via RuntimeServicesSupported mask. "
@@ -1185,7 +1185,7 @@ static int uefirttime_test38(fwts_framework *fw)
fwts_skipped(fw, "Unknown error occurred, skip test.");
return FWTS_SKIP;
}
- if (var_runtimeservicessupported & EFI_RT_SUPPORTED_GET_TIME) {
+ if (runtimeservicessupported & EFI_RT_SUPPORTED_GET_TIME) {
fwts_passed(fw, "UEFI GetTime runtime service "
"supported status test passed.");
} else {
@@ -1200,7 +1200,7 @@ static int uefirttime_test38(fwts_framework *fw)
fwts_skipped(fw, "Unknown error occurred, skip test.");
return FWTS_SKIP;
}
- if (var_runtimeservicessupported & EFI_RT_SUPPORTED_GET_TIME) {
+ if (runtimeservicessupported & EFI_RT_SUPPORTED_GET_TIME) {
fwts_passed(fw, "UEFI GetTime runtime service "
"supported status test passed.");
} else {
@@ -1218,7 +1218,7 @@ static int uefirttime_test38(fwts_framework *fw)
ioret = ioctl(fd, EFI_RUNTIME_SET_TIME, &settime);
if (ioret == -1) {
if (status == EFI_UNSUPPORTED) {
- if (var_runtimeservicessupported & EFI_RT_SUPPORTED_SET_TIME) {
+ if (runtimeservicessupported & EFI_RT_SUPPORTED_SET_TIME) {
fwts_failed(fw, LOG_LEVEL_HIGH, "UEFIRuntimeSetTime",
"Get the SetTime runtime service supported "
"via RuntimeServicesSupported mask. "
@@ -1232,7 +1232,7 @@ static int uefirttime_test38(fwts_framework *fw)
fwts_skipped(fw, "Unknown error occurred, skip test.");
return FWTS_SKIP;
}
- if (var_runtimeservicessupported & EFI_RT_SUPPORTED_SET_TIME) {
+ if (runtimeservicessupported & EFI_RT_SUPPORTED_SET_TIME) {
fwts_passed(fw, "UEFI SetTime runtime service "
"supported status test passed.");
} else {
@@ -1247,7 +1247,7 @@ static int uefirttime_test38(fwts_framework *fw)
fwts_skipped(fw, "Unknown error occurred, skip test.");
return FWTS_SKIP;
}
- if (var_runtimeservicessupported & EFI_RT_SUPPORTED_SET_TIME) {
+ if (runtimeservicessupported & EFI_RT_SUPPORTED_SET_TIME) {
fwts_passed(fw, "UEFI SetTime runtime service "
"supported status test passed.");
} else {
@@ -1266,7 +1266,7 @@ static int uefirttime_test38(fwts_framework *fw)
ioret = ioctl(fd, EFI_RUNTIME_SET_WAKETIME, &setwakeuptime);
if (ioret == -1) {
if (status == EFI_UNSUPPORTED) {
- if (var_runtimeservicessupported & EFI_RT_SUPPORTED_SET_WAKEUP_TIME) {
+ if (runtimeservicessupported & EFI_RT_SUPPORTED_SET_WAKEUP_TIME) {
fwts_failed(fw, LOG_LEVEL_HIGH, "UEFIRuntimeSetWakeupTime",
"Get the SetWakeupTime runtime service supported "
"via RuntimeServicesSupported mask. "
@@ -1281,7 +1281,7 @@ static int uefirttime_test38(fwts_framework *fw)
fwts_skipped(fw, "Unknown error occurred, skip test.");
return FWTS_SKIP;
}
- if (var_runtimeservicessupported & EFI_RT_SUPPORTED_SET_WAKEUP_TIME) {
+ if (runtimeservicessupported & EFI_RT_SUPPORTED_SET_WAKEUP_TIME) {
fwts_passed(fw, "UEFI SetWakeupTime runtime service "
"supported status test passed.");
} else {
@@ -1296,7 +1296,7 @@ static int uefirttime_test38(fwts_framework *fw)
fwts_skipped(fw, "Unknown error occurred, skip test.");
return FWTS_SKIP;
}
- if (var_runtimeservicessupported & EFI_RT_SUPPORTED_SET_WAKEUP_TIME) {
+ if (runtimeservicessupported & EFI_RT_SUPPORTED_SET_WAKEUP_TIME) {
fwts_passed(fw, "UEFI SetWakeupTime runtime service "
"supported status test passed.");
} else {
@@ -1315,7 +1315,7 @@ static int uefirttime_test38(fwts_framework *fw)
ioret = ioctl(fd, EFI_RUNTIME_GET_WAKETIME, &getwakeuptime);
if (ioret == -1) {
if (status == EFI_UNSUPPORTED) {
- if (var_runtimeservicessupported & EFI_RT_SUPPORTED_GET_WAKEUP_TIME) {
+ if (runtimeservicessupported & EFI_RT_SUPPORTED_GET_WAKEUP_TIME) {
fwts_failed(fw, LOG_LEVEL_HIGH, "UEFIRuntimeGetWakeupTime",
"Get the GetWakeupTime runtime service supported "
"via RuntimeServicesSupported mask. "
@@ -1329,7 +1329,7 @@ static int uefirttime_test38(fwts_framework *fw)
fwts_skipped(fw, "Unknown error occurred, skip test.");
return FWTS_SKIP;
}
- if (var_runtimeservicessupported & EFI_RT_SUPPORTED_GET_WAKEUP_TIME) {
+ if (runtimeservicessupported & EFI_RT_SUPPORTED_GET_WAKEUP_TIME) {
fwts_passed(fw, "UEFI GetWakeupTime runtime service "
"supported status test passed.");
} else {
@@ -1344,7 +1344,7 @@ static int uefirttime_test38(fwts_framework *fw)
fwts_skipped(fw, "Unknow error occurred, skip test.");
return FWTS_SKIP;
}
- if (var_runtimeservicessupported & EFI_RT_SUPPORTED_GET_WAKEUP_TIME) {
+ if (runtimeservicessupported & EFI_RT_SUPPORTED_GET_WAKEUP_TIME) {
fwts_passed(fw, "UEFI GetWakeupTime runtime service "
"supported status test passed.");
} else {
diff --git a/src/uefi/uefirtvariable/uefirtvariable.c b/src/uefi/uefirtvariable/uefirtvariable.c
index eb6cce90..f39c7b2a 100644
--- a/src/uefi/uefirtvariable/uefirtvariable.c
+++ b/src/uefi/uefirtvariable/uefirtvariable.c
@@ -2021,7 +2021,7 @@ static int uefirtvariable_test9(fwts_framework *fw)
long ioret;
bool have_rtsupported;
- uint32_t var_runtimeservicessupported;
+ uint32_t runtimeservicessupported;
struct efi_getvariable getvariable;
struct efi_setvariable setvariable;
@@ -2042,7 +2042,7 @@ static int uefirtvariable_test9(fwts_framework *fw)
uint32_t attr;
fwts_uefi_rt_support_status_get(fd, &have_rtsupported,
- &var_runtimeservicessupported);
+ &runtimeservicessupported);
if (!have_rtsupported) {
fwts_skipped(fw, "Cannot get the RuntimeServicesSupported "
@@ -2061,7 +2061,7 @@ static int uefirtvariable_test9(fwts_framework *fw)
ioret = ioctl(fd, EFI_RUNTIME_SET_VARIABLE, &setvariable);
if (ioret == -1) {
if (status == EFI_UNSUPPORTED) {
- if (var_runtimeservicessupported & EFI_RT_SUPPORTED_SET_VARIABLE) {
+ if (runtimeservicessupported & EFI_RT_SUPPORTED_SET_VARIABLE) {
fwts_failed(fw, LOG_LEVEL_HIGH, "UEFIRuntimeSetVariable",
"Get the Setvariable runtime service supported "
"via RuntimeServicesSupported mask. "
@@ -2075,7 +2075,7 @@ static int uefirtvariable_test9(fwts_framework *fw)
fwts_skipped(fw, "Unknown error occurred, skip test.");
return FWTS_SKIP;
}
- if (var_runtimeservicessupported & EFI_RT_SUPPORTED_SET_VARIABLE) {
+ if (runtimeservicessupported & EFI_RT_SUPPORTED_SET_VARIABLE) {
fwts_passed(fw, "UEFI SetVariable runtime service "
"supported status test passed.");
} else {
@@ -2090,7 +2090,7 @@ static int uefirtvariable_test9(fwts_framework *fw)
fwts_skipped(fw, "Unknown error occurred, skip test.");
return FWTS_SKIP;
}
- if (var_runtimeservicessupported & EFI_RT_SUPPORTED_SET_VARIABLE) {
+ if (runtimeservicessupported & EFI_RT_SUPPORTED_SET_VARIABLE) {
fwts_passed(fw, "UEFI SetVariable runtime service "
"supported status test passed.");
} else {
@@ -2111,7 +2111,7 @@ static int uefirtvariable_test9(fwts_framework *fw)
ioret = ioctl(fd, EFI_RUNTIME_GET_VARIABLE, &getvariable);
if (ioret == -1) {
if (status == EFI_UNSUPPORTED) {
- if (var_runtimeservicessupported & EFI_RT_SUPPORTED_GET_VARIABLE) {
+ if (runtimeservicessupported & EFI_RT_SUPPORTED_GET_VARIABLE) {
fwts_failed(fw, LOG_LEVEL_HIGH, "UEFIRuntimeGetVariable",
"Get the GetVariable runtime service supported "
"via RuntimeServicesSupported mask. "
@@ -2125,7 +2125,7 @@ static int uefirtvariable_test9(fwts_framework *fw)
fwts_skipped(fw, "Unknown error occurred, skip test.");
return FWTS_SKIP;
}
- if (var_runtimeservicessupported & EFI_RT_SUPPORTED_GET_VARIABLE) {
+ if (runtimeservicessupported & EFI_RT_SUPPORTED_GET_VARIABLE) {
fwts_passed(fw, "UEFI GetVariable runtime service "
"supported status test passed.");
} else {
@@ -2140,7 +2140,7 @@ static int uefirtvariable_test9(fwts_framework *fw)
fwts_skipped(fw, "Unknown error occurred, skip test.");
return FWTS_SKIP;
}
- if (var_runtimeservicessupported & EFI_RT_SUPPORTED_GET_VARIABLE) {
+ if (runtimeservicessupported & EFI_RT_SUPPORTED_GET_VARIABLE) {
fwts_passed(fw, "UEFI GetVariable runtime service "
"supported status test passed.");
} else {
@@ -2171,7 +2171,7 @@ static int uefirtvariable_test9(fwts_framework *fw)
ioret = ioctl(fd, EFI_RUNTIME_GET_NEXTVARIABLENAME, &getnextvariablename);
if (ioret == -1) {
if (status == EFI_UNSUPPORTED) {
- if (var_runtimeservicessupported & EFI_RT_SUPPORTED_GET_NEXT_VARIABLE_NAME) {
+ if (runtimeservicessupported & EFI_RT_SUPPORTED_GET_NEXT_VARIABLE_NAME) {
fwts_failed(fw, LOG_LEVEL_HIGH, "UEFIRuntimeGetNextVarName",
"Get the GetNextVarName runtime service supported "
"via RuntimeServicesSupported mask. "
@@ -2185,7 +2185,7 @@ static int uefirtvariable_test9(fwts_framework *fw)
fwts_skipped(fw, "Unknown error occurred, skip test.");
return FWTS_SKIP;
}
- if (var_runtimeservicessupported & EFI_RT_SUPPORTED_GET_NEXT_VARIABLE_NAME) {
+ if (runtimeservicessupported & EFI_RT_SUPPORTED_GET_NEXT_VARIABLE_NAME) {
fwts_passed(fw, "UEFI GetNextVarName runtime service "
"supported status test passed.");
} else {
@@ -2200,7 +2200,7 @@ static int uefirtvariable_test9(fwts_framework *fw)
fwts_skipped(fw, "Unknown error occurred, skip test.");
return FWTS_SKIP;
}
- if (var_runtimeservicessupported & EFI_RT_SUPPORTED_GET_NEXT_VARIABLE_NAME) {
+ if (runtimeservicessupported & EFI_RT_SUPPORTED_GET_NEXT_VARIABLE_NAME) {
fwts_passed(fw, "UEFI GetNextVarName runtime service "
"supported status test passed.");
} else {
@@ -2221,7 +2221,7 @@ static int uefirtvariable_test9(fwts_framework *fw)
ioret = ioctl(fd, EFI_RUNTIME_QUERY_VARIABLEINFO, &queryvariableinfo);
if (ioret == -1) {
if (status == EFI_UNSUPPORTED) {
- if (var_runtimeservicessupported & EFI_RT_SUPPORTED_QUERY_VARIABLE_INFO) {
+ if (runtimeservicessupported & EFI_RT_SUPPORTED_QUERY_VARIABLE_INFO) {
fwts_failed(fw, LOG_LEVEL_HIGH, "UEFIRuntimeQueryVarInfo",
"Get the QueryVarInfo runtime service supported "
"via RuntimeServicesSupported mask. "
@@ -2235,7 +2235,7 @@ static int uefirtvariable_test9(fwts_framework *fw)
fwts_skipped(fw, "Unknown error occurred, skip test.");
return FWTS_SKIP;
}
- if (var_runtimeservicessupported & EFI_RT_SUPPORTED_QUERY_VARIABLE_INFO) {
+ if (runtimeservicessupported & EFI_RT_SUPPORTED_QUERY_VARIABLE_INFO) {
fwts_passed(fw, "UEFI QueryVarInfo runtime service "
"supported status test passed.");
} else {
@@ -2250,7 +2250,7 @@ static int uefirtvariable_test9(fwts_framework *fw)
fwts_skipped(fw, "Unknown error occurred, skip test.");
return FWTS_SKIP;
}
- if (var_runtimeservicessupported & EFI_RT_SUPPORTED_QUERY_VARIABLE_INFO) {
+ if (runtimeservicessupported & EFI_RT_SUPPORTED_QUERY_VARIABLE_INFO) {
fwts_passed(fw, "UEFI QueryVarInfo runtime service "
"supported status test passed.");
} else {
--
2.25.1
More information about the fwts-devel
mailing list