summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/efi_loader/efi_device_path.c7
-rw-r--r--lib/efi_loader/efi_hii.c38
2 files changed, 20 insertions, 25 deletions
diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c
index 98c36e798f..53b40c8c3c 100644
--- a/lib/efi_loader/efi_device_path.c
+++ b/lib/efi_loader/efi_device_path.c
@@ -985,12 +985,7 @@ efi_status_t efi_dp_from_name(const char *dev, const char *devnr,
if (!path)
return EFI_SUCCESS;
- if (!is_net) {
- /* Add leading / to fs paths, because they're absolute */
- snprintf(filename, sizeof(filename), "/%s", path);
- } else {
- snprintf(filename, sizeof(filename), "%s", path);
- }
+ snprintf(filename, sizeof(filename), "%s", path);
/* DOS style file path: */
s = filename;
while ((s = strchr(s, '/')))
diff --git a/lib/efi_loader/efi_hii.c b/lib/efi_loader/efi_hii.c
index d63d2d8418..3a966fa4df 100644
--- a/lib/efi_loader/efi_hii.c
+++ b/lib/efi_loader/efi_hii.c
@@ -343,6 +343,7 @@ static struct efi_hii_packagelist *new_packagelist(void)
struct efi_hii_packagelist *hii;
hii = malloc(sizeof(*hii));
+ list_add_tail(&hii->link, &efi_package_lists);
hii->max_string_id = 0;
INIT_LIST_HEAD(&hii->string_tables);
INIT_LIST_HEAD(&hii->guid_list);
@@ -387,7 +388,7 @@ add_packages(struct efi_hii_packagelist *hii,
(struct efi_hii_guid_package *)package);
break;
case EFI_HII_PACKAGE_FORMS:
- printf("\tForm package not supported\n");
+ EFI_PRINT("Form package not supported\n");
ret = EFI_INVALID_PARAMETER;
break;
case EFI_HII_PACKAGE_STRINGS:
@@ -395,19 +396,19 @@ add_packages(struct efi_hii_packagelist *hii,
(struct efi_hii_strings_package *)package);
break;
case EFI_HII_PACKAGE_FONTS:
- printf("\tFont package not supported\n");
+ EFI_PRINT("Font package not supported\n");
ret = EFI_INVALID_PARAMETER;
break;
case EFI_HII_PACKAGE_IMAGES:
- printf("\tImage package not supported\n");
+ EFI_PRINT("Image package not supported\n");
ret = EFI_INVALID_PARAMETER;
break;
case EFI_HII_PACKAGE_SIMPLE_FONTS:
- printf("\tSimple font package not supported\n");
+ EFI_PRINT("Simple font package not supported\n");
ret = EFI_INVALID_PARAMETER;
break;
case EFI_HII_PACKAGE_DEVICE_PATH:
- printf("\tDevice path package not supported\n");
+ EFI_PRINT("Device path package not supported\n");
ret = EFI_INVALID_PARAMETER;
break;
case EFI_HII_PACKAGE_KEYBOARD_LAYOUT:
@@ -415,7 +416,7 @@ add_packages(struct efi_hii_packagelist *hii,
(struct efi_hii_keyboard_package *)package);
break;
case EFI_HII_PACKAGE_ANIMATIONS:
- printf("\tAnimation package not supported\n");
+ EFI_PRINT("Animation package not supported\n");
ret = EFI_INVALID_PARAMETER;
break;
case EFI_HII_PACKAGE_END:
@@ -465,7 +466,6 @@ new_package_list(const struct efi_hii_database_protocol *this,
}
hii->driver_handle = driver_handle;
- list_add_tail(&hii->link, &efi_package_lists);
*handle = hii;
return EFI_EXIT(EFI_SUCCESS);
@@ -522,33 +522,33 @@ update_package_list(const struct efi_hii_database_protocol *this,
remove_guid_package(hii);
break;
case EFI_HII_PACKAGE_FORMS:
- printf("\tForm package not supported\n");
+ EFI_PRINT("Form package not supported\n");
ret = EFI_INVALID_PARAMETER;
break;
case EFI_HII_PACKAGE_STRINGS:
remove_strings_package(hii);
break;
case EFI_HII_PACKAGE_FONTS:
- printf("\tFont package not supported\n");
+ EFI_PRINT("Font package not supported\n");
ret = EFI_INVALID_PARAMETER;
break;
case EFI_HII_PACKAGE_IMAGES:
- printf("\tImage package not supported\n");
+ EFI_PRINT("Image package not supported\n");
ret = EFI_INVALID_PARAMETER;
break;
case EFI_HII_PACKAGE_SIMPLE_FONTS:
- printf("\tSimple font package not supported\n");
+ EFI_PRINT("Simple font package not supported\n");
ret = EFI_INVALID_PARAMETER;
break;
case EFI_HII_PACKAGE_DEVICE_PATH:
- printf("\tDevice path package not supported\n");
+ EFI_PRINT("Device path package not supported\n");
ret = EFI_INVALID_PARAMETER;
break;
case EFI_HII_PACKAGE_KEYBOARD_LAYOUT:
remove_keyboard_package(hii);
break;
case EFI_HII_PACKAGE_ANIMATIONS:
- printf("\tAnimation package not supported\n");
+ EFI_PRINT("Animation package not supported\n");
ret = EFI_INVALID_PARAMETER;
break;
case EFI_HII_PACKAGE_END:
@@ -609,7 +609,7 @@ list_package_lists(const struct efi_hii_database_protocol *this,
break;
continue;
case EFI_HII_PACKAGE_FORMS:
- printf("\tForm package not supported\n");
+ EFI_PRINT("Form package not supported\n");
ret = EFI_INVALID_PARAMETER;
continue;
case EFI_HII_PACKAGE_STRINGS:
@@ -617,19 +617,19 @@ list_package_lists(const struct efi_hii_database_protocol *this,
break;
continue;
case EFI_HII_PACKAGE_FONTS:
- printf("\tFont package not supported\n");
+ EFI_PRINT("Font package not supported\n");
ret = EFI_INVALID_PARAMETER;
continue;
case EFI_HII_PACKAGE_IMAGES:
- printf("\tImage package not supported\n");
+ EFI_PRINT("Image package not supported\n");
ret = EFI_INVALID_PARAMETER;
continue;
case EFI_HII_PACKAGE_SIMPLE_FONTS:
- printf("\tSimple font package not supported\n");
+ EFI_PRINT("Simple font package not supported\n");
ret = EFI_INVALID_PARAMETER;
continue;
case EFI_HII_PACKAGE_DEVICE_PATH:
- printf("\tDevice path package not supported\n");
+ EFI_PRINT("Device path package not supported\n");
ret = EFI_INVALID_PARAMETER;
continue;
case EFI_HII_PACKAGE_KEYBOARD_LAYOUT:
@@ -637,7 +637,7 @@ list_package_lists(const struct efi_hii_database_protocol *this,
break;
continue;
case EFI_HII_PACKAGE_ANIMATIONS:
- printf("\tAnimation package not supported\n");
+ EFI_PRINT("Animation package not supported\n");
ret = EFI_INVALID_PARAMETER;
continue;
case EFI_HII_PACKAGE_END: