efi_loader: implement EFI_FILE_SYSTEM_INFO

Implement the information type EFI_FILE_SYSTEM_INFO in the service
GetInfo() of the EFI_FILE_PROTOCOL.

The volume label is not available in U-Boot. As a work-around use the
partition name instead.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
diff --git a/include/efi_api.h b/include/efi_api.h
index 8af466a..ae93061 100644
--- a/include/efi_api.h
+++ b/include/efi_api.h
@@ -889,6 +889,10 @@
 	EFI_GUID(0x9576e92, 0x6d3f, 0x11d2, \
 		 0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b)
 
+#define EFI_FILE_SYSTEM_INFO_GUID \
+	EFI_GUID(0x09576e93, 0x6d3f, 0x11d2, \
+		 0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b)
+
 #define EFI_FILE_MODE_READ	0x0000000000000001
 #define EFI_FILE_MODE_WRITE	0x0000000000000002
 #define EFI_FILE_MODE_CREATE	0x8000000000000000
@@ -912,6 +916,15 @@
 	s16 file_name[0];
 };
 
+struct efi_file_system_info {
+	u64 size;
+	u8 read_only;
+	u64 volume_size;
+	u64 free_space;
+	u32 block_size;
+	u16 volume_label[0];
+};
+
 #define EFI_DRIVER_BINDING_PROTOCOL_GUID \
 	EFI_GUID(0x18a031ab, 0xb443, 0x4d1a,\
 		 0xa5, 0xc0, 0x0c, 0x09, 0x26, 0x1e, 0x9f, 0x71)