efi_dp_from_name() uses a fixed length (32) of buffer, and so it cannot handle a long file path name. This patch set lifts the upper limit as well as other limitations regarding file paths.
For example, without this patch set, => efi boot add 1 TEST scsi 1:1 /0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef/0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef/Shell.efi "" => efi boot dump Boot0001: attributes: A-- (0x00000001) label: TEST file_path: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/Scsi(1,0)/HD(1,MBR,0x086246ba,0x800,0x40000)/\0123456789abcdef0123456789abcd data: 00000000: 00 00 => The path was truncated With this patch set applied, => efi boot add 1 TEST scsi 1:1 /0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef/0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef/Shell.efi "" => efi boot dump Boot0001: attributes: A-- (0x00000001) label: TEST file_path: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/Scsi(1,0)/HD(1,MBR,0x086246ba,0x800,0x40000)/\0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789 data: 00000000: 00 00 => still truncated, but it was due to limitation of command line processing (CONFIG_SYS_CBSIZE?), not due to device path Changes in v2 (Oct 9, 2019) * add patch#1 after Heinrich's comment * add patch#2 after Heinrich's comment AKASHI Takahiro (3): efi_loader: device_path: check against file path length efi_loader: device_path: lift the upper limit in dp-to-text conversion efi_loader: device_path: allow for arbitrary length of file path lib/efi_loader/efi_device_path.c | 23 ++++-- lib/efi_loader/efi_device_path_to_text.c | 90 +++++++++++++++++++++--- 2 files changed, 96 insertions(+), 17 deletions(-) -- 2.21.0 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot