]> git.baikalelectronics.ru Git - uboot.git/commit
vsprintf.c: correct printing of a NULL device path
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Fri, 26 Jan 2018 05:30:30 +0000 (06:30 +0100)
committerAlexander Graf <agraf@suse.de>
Sun, 28 Jan 2018 20:37:13 +0000 (21:37 +0100)
commit6a2e10b717288a6a7e3c1088f28e50ad3bb32610
treee2f2673d1ca5c157fa8baddbc056a33c50aeeae1
parent0c1504f0b1bcb70139564f49d620149a05c973e1
vsprintf.c: correct printing of a NULL device path

When printing '%pD' with a value of NULL we want to output
'<NULL>'. But this requires copying to buf. Leave this
to string16.

A unit test is supplied which relies on EFI support in the sandbox.

The development for EFI support in the sandbox is currently in branch
u-boot-dm/efi-working. The branch lacks commit e4cb9952d7f0 ("efi_loader:
correct DeviceNodeToText for media types"). Ater rebasing the aforementioned
branch on U-Boot v2018.01 and adding 10a45b93942dd and this patch the test
is executed successfully.

Fixes: 10a45b93942dd (vsprintf.c: add EFI device path printing)
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
lib/vsprintf.c
test/print_ut.c