From cd73aba656b19d795eaf5756d5d4815d299cf07f Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Wed, 1 May 2019 14:20:18 +0200 Subject: efi_loader: mark started images In UnloadImage() we need to know if an image is already started. Add a field to the handle structure identifying loaded and started images. Signed-off-by: Heinrich Schuchardt --- include/efi_loader.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include/efi_loader.h') diff --git a/include/efi_loader.h b/include/efi_loader.h index 7af3f16ef84..3b50cd28ef0 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -179,6 +179,18 @@ struct efi_handler { struct list_head open_infos; }; +/** + * enum efi_object_type - type of EFI object + * + * In UnloadImage we must be able to identify if the handle relates to a + * started image. + */ +enum efi_object_type { + EFI_OBJECT_TYPE_UNDEFINED = 0, + EFI_OBJECT_TYPE_LOADED_IMAGE, + EFI_OBJECT_TYPE_STARTED_IMAGE, +}; + /** * struct efi_object - dereferenced EFI handle * @@ -201,6 +213,7 @@ struct efi_object { struct list_head link; /* The list of protocols */ struct list_head protocols; + enum efi_object_type type; }; /** -- cgit v1.2.3