efi_loader: rename parent to header
Rename the component parent of some EFI objects to header. This avoids
misunderstandings.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
diff --git a/lib/efi_loader/efi_disk.c b/lib/efi_loader/efi_disk.c
index e861fee..c037526 100644
--- a/lib/efi_loader/efi_disk.c
+++ b/lib/efi_loader/efi_disk.c
@@ -14,26 +14,30 @@
const efi_guid_t efi_block_io_guid = BLOCK_IO_GUID;
+/**
+ * struct efi_disk_obj - EFI disk object
+ *
+ * @header: EFI object header
+ * @ops: EFI disk I/O protocol interface
+ * @ifname: interface name for block device
+ * @dev_index: device index of block device
+ * @media: block I/O media information
+ * @dp: device path to the block device
+ * @part: partition
+ * @volume: simple file system protocol of the partition
+ * @offset: offset into disk for simple partition
+ * @desc: internal block device descriptor
+ */
struct efi_disk_obj {
- /* Generic EFI object parent class data */
- struct efi_object parent;
- /* EFI Interface callback struct for block I/O */
+ struct efi_object header;
struct efi_block_io ops;
- /* U-Boot ifname for block device */
const char *ifname;
- /* U-Boot dev_index for block device */
int dev_index;
- /* EFI Interface Media descriptor struct, referenced by ops */
struct efi_block_io_media media;
- /* EFI device path to this block device */
struct efi_device_path *dp;
- /* partition # */
unsigned int part;
- /* handle to filesys proto (for partition objects) */
struct efi_simple_file_system_protocol *volume;
- /* Offset into disk for simple partitions */
lbaint_t offset;
- /* Internal block device */
struct blk_desc *desc;
};
@@ -246,7 +250,7 @@
return EFI_OUT_OF_RESOURCES;
/* Hook up to the device list */
- efi_add_handle(&diskobj->parent);
+ efi_add_handle(&diskobj->header);
/* Fill in object data */
if (part) {
@@ -258,18 +262,18 @@
diskobj->dp = efi_dp_from_part(desc, part);
}
diskobj->part = part;
- ret = efi_add_protocol(&diskobj->parent, &efi_block_io_guid,
+ ret = efi_add_protocol(&diskobj->header, &efi_block_io_guid,
&diskobj->ops);
if (ret != EFI_SUCCESS)
return ret;
- ret = efi_add_protocol(&diskobj->parent, &efi_guid_device_path,
+ ret = efi_add_protocol(&diskobj->header, &efi_guid_device_path,
diskobj->dp);
if (ret != EFI_SUCCESS)
return ret;
if (part >= 1) {
diskobj->volume = efi_simple_file_system(desc, part,
diskobj->dp);
- ret = efi_add_protocol(&diskobj->parent,
+ ret = efi_add_protocol(&diskobj->header,
&efi_simple_file_system_protocol_guid,
diskobj->volume);
if (ret != EFI_SUCCESS)
@@ -381,7 +385,7 @@
/* Partitions show up as block devices in EFI */
disks += efi_disk_create_partitions(
- &disk->parent, desc, if_typename,
+ &disk->header, desc, if_typename,
desc->devnum, dev->name);
}
#else
@@ -427,7 +431,7 @@
/* Partitions show up as block devices in EFI */
disks += efi_disk_create_partitions
- (&disk->parent, desc,
+ (&disk->header, desc,
if_typename, i, devname);
}
}