We now have internal functions for OpenVolume,  EFI_FILE_PROTOCOL.Open()
and EFI_FILE_PROTOCOL.Close().  So use these instead of wrapping the
callsites with EFI_CALL()

Signed-off-by: Ilias Apalodimas <ilias.apalodi...@linaro.org>
---
 lib/efi_loader/efi_file.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/lib/efi_loader/efi_file.c b/lib/efi_loader/efi_file.c
index c96a7f7ca371..8480ed3007c7 100644
--- a/lib/efi_loader/efi_file.c
+++ b/lib/efi_loader/efi_file.c
@@ -1111,7 +1111,7 @@ struct efi_file_handle *efi_file_from_path(struct 
efi_device_path *fp)
        if (!v)
                return NULL;
 
-       EFI_CALL(ret = v->open_volume(v, &f));
+       ret = efi_open_volume_int(v, &f);
        if (ret != EFI_SUCCESS)
                return NULL;
 
@@ -1131,22 +1131,21 @@ struct efi_file_handle *efi_file_from_path(struct 
efi_device_path *fp)
 
                if (!EFI_DP_TYPE(fp, MEDIA_DEVICE, FILE_PATH)) {
                        printf("bad file path!\n");
-                       f->close(f);
+                       efi_file_close_int(f);
                        return NULL;
                }
 
                filename = u16_strdup(fdp->str);
                if (!filename)
                        return NULL;
-               EFI_CALL(ret = f->open(f, &f2, filename,
-                                      EFI_FILE_MODE_READ, 0));
+               ret = efi_file_open_int(f, &f2, filename, EFI_FILE_MODE_READ, 
0);
                free(filename);
                if (ret != EFI_SUCCESS)
                        return NULL;
 
                fp = efi_dp_next(fp);
 
-               EFI_CALL(f->close(f));
+               efi_file_close_int(f);
                f = f2;
        }
 
-- 
2.38.1

Reply via email to