@@ -9,9 +9,6 @@
#include <common.h>
#include <efi_loader.h>
-#define MEDIA_DEVICE_PATH 4
-#define FILE_PATH_MEDIA_DEVICE_PATH 4
-
const efi_guid_t efi_guid_device_path_to_text_protocol =
EFI_DEVICE_PATH_TO_TEXT_PROTOCOL_GUID;
@@ -38,9 +35,9 @@ uint16_t *efi_convert_device_path_to_text(
uint16_t *buffer = NULL;
switch (device_path->type) {
- case MEDIA_DEVICE_PATH:
+ case DEVICE_PATH_TYPE_MEDIA_DEVICE:
switch (device_path->sub_type) {
- case FILE_PATH_MEDIA_DEVICE_PATH:
+ case DEVICE_PATH_SUB_TYPE_FILE_PATH:
buffer_size = device_path->length - 4;
r = efi_allocate_pool(EFI_ALLOCATE_ANY_PAGES,
buffer_size, (void **) &buffer);
We should not duplicate existing constants used by the device path protocol. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> --- v2 no change --- lib/efi_loader/efi_device_path_to_text.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)