Fix compilation without EFI being enabled

If EFI is disabled compilation can fail with:

../src/login/logind-dbus.c: In function ‘property_get_reboot_to_boot_loader_entry’:
../src/login/logind-dbus.c:2772:29: error: implicit declaration of function ‘efi_loader_entry_name_valid’; did you mean ‘efi_loader_get_features’? [-Werror=implicit-function-declaration]
                 } else if (!efi_loader_entry_name_valid(v)) {
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
                             efi_loader_get_features
../src/login/logind-dbus.c:2772:29: warning: nested extern declaration of ‘efi_loader_entry_name_valid’ [-Wnested-externs]

This adds stub for efi_loader_entry_name_valid() to enable compilation.
This commit is contained in:
Vesa Jääskeläinen
2019-03-11 10:48:49 +09:00
committed by Yu Watanabe
parent 988e400489
commit ab212633d4
+4
View File
@@ -132,6 +132,10 @@ static inline int efi_loader_get_entries(char ***ret) {
return -EOPNOTSUPP;
}
static inline bool efi_loader_entry_name_valid(const char *s) {
return false;
}
static inline int efi_loader_get_features(uint64_t *ret) {
return -EOPNOTSUPP;
}