efi_loader: support device path for IDE and SCSI disks

Correctly create the device path for IDE and SCSI disks.

Support for SATA remains to be done in a future patch.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
Heinrich Schuchardt 2017-12-11 12:56:44 +01:00 committed by Alexander Graf
parent 2bc61b8352
commit af3106a12d
3 changed files with 93 additions and 0 deletions

View file

@ -87,6 +87,20 @@ static char *dp_acpi(char *s, struct efi_device_path *dp)
static char *dp_msging(char *s, struct efi_device_path *dp)
{
switch (dp->sub_type) {
case DEVICE_PATH_SUB_TYPE_MSG_ATAPI: {
struct efi_device_path_atapi *ide =
(struct efi_device_path_atapi *)dp;
s += sprintf(s, "Ata(%d,%d,%d)", ide->primary_secondary,
ide->slave_master, ide->logical_unit_number);
break;
}
case DEVICE_PATH_SUB_TYPE_MSG_SCSI: {
struct efi_device_path_scsi *ide =
(struct efi_device_path_scsi *)dp;
s += sprintf(s, "Scsi(%u,%u)", ide->target_id,
ide->logical_unit_number);
break;
}
case DEVICE_PATH_SUB_TYPE_MSG_USB: {
struct efi_device_path_usb *udp =
(struct efi_device_path_usb *)dp;