summaryrefslogtreecommitdiff
path: root/src/boot/efi/util.h
diff options
context:
space:
mode:
authorJan Janssen <medhefgo@web.de>2022-08-04 10:21:15 +0200
committerJan Janssen <medhefgo@web.de>2022-08-04 10:21:15 +0200
commitbafc594528767192bc4b3c0081a992a9e2647d50 (patch)
tree12c1efc35118bb424a654c611f0784effaa021a5 /src/boot/efi/util.h
parentadb9485acb2b7f429a72ce6db024724a809b6ec1 (diff)
downloadsystemd-bafc594528767192bc4b3c0081a992a9e2647d50.tar.gz
boot: Skip safety countdown when running in a VM
Diffstat (limited to 'src/boot/efi/util.h')
-rw-r--r--src/boot/efi/util.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/boot/efi/util.h b/src/boot/efi/util.h
index bb4bb64e0e..afbc217d53 100644
--- a/src/boot/efi/util.h
+++ b/src/boot/efi/util.h
@@ -179,3 +179,11 @@ static inline void beep(UINTN beep_count) {}
EFI_STATUS open_volume(EFI_HANDLE device, EFI_FILE **ret_file);
EFI_STATUS make_file_device_path(EFI_HANDLE device, const char16_t *file, EFI_DEVICE_PATH **ret_dp);
+
+#if defined(__i386__) || defined(__x86_64__)
+bool in_hypervisor(void);
+#else
+static inline bool in_hypervisor(void) {
+ return false;
+}
+#endif