mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
efi_loader: implement CreateDeviceNode
Implement the CreateDeviceNode service of the device path utility protocol. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
parent
065a8eca69
commit
211314c107
3 changed files with 35 additions and 2 deletions
|
@ -315,6 +315,21 @@ struct efi_device_path *efi_dp_append_node(const struct efi_device_path *dp,
|
|||
return ret;
|
||||
}
|
||||
|
||||
struct efi_device_path *efi_dp_create_device_node(const u8 type,
|
||||
const u8 sub_type,
|
||||
const u16 length)
|
||||
{
|
||||
struct efi_device_path *ret;
|
||||
|
||||
ret = dp_alloc(length);
|
||||
if (!ret)
|
||||
return ret;
|
||||
ret->type = type;
|
||||
ret->sub_type = sub_type;
|
||||
ret->length = length;
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_DM
|
||||
/* size of device-path not including END node for device and all parents
|
||||
* up to the root device.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue