When we don't have a real device/image path, such as 'bootefi hello',
construct a mem-mapped device-path.
This fixes 'bootefi hello' after devicepath refactoring.
Fixes: 95c5553ea2 ("efi_loader: refactor boot device and loaded_image handling")
Signed-off-by: Rob Clark <robdclark@gmail.com>
Acked-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
It needs to handle more device-path node types, and also multiple levels
of path hierarchy. To simplify this, initially construct utf8 string to
a temporary buffer, and then allocate the real utf16 buffer that is
returned. This should be mostly for debugging or at least not critical-
path so an extra copy won't hurt, and is saner than the alternative.
Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
This is really the same thing as the efi_device_path struct.
Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Move the logic for converting a node to text from
efi_convert_device_path_to_text to convert_device_node_to_text.
Provide a wrapper function convert_device_node_to_text_ext.
As we use only shallow device paths so we can call
directly call efi_device_node_to_text from efi_device_path_to_text.
Add output for MAC addresses.
Add output for not yet supported types/subtypes.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
ConvertPathToText is implemented for
* type 4 - media device path
* subtype 4 - file path
This is the kind of device path we hand out for block devices.
All other cases may be implemented later.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
[agraf: fix whitespace]
Signed-off-by: Alexander Graf <agraf@suse.de>