[U-Boot] [PATCH 1/1] vsprintf.c: add EFI device path printing
Heinrich Schuchardt
xypron.glpk at gmx.de
Sun Nov 26 14:01:52 UTC 2017
On 11/26/2017 02:39 PM, Wolfgang Denk wrote:
> Dear Heinrich,
>
> In message <55e69128-b30c-78af-7e96-3aba873dfd73 at gmx.de> you wrote:
>>
>> to cut it short, would you prefer
>>
>> https://patchwork.ozlabs.org/patch/840912/
>>
>> or
>>
>> https://github.com/xypron/u-boot-odroid-c2/blob/qemu-x86_64/patch/0001-vsprintf.c-add-EFI-device-path-printing.patch
>
> Urgh. I really hate such external references.
>
> IIUC, then [2] has as only difference an additional early return in
> printf(). The only effect of this is to skip the
> "puts(printbuffer);".
1 panics, 2 returns an error code and does not panic
>
> I can't say if this is worth the effort. In any case, you introduce
> inconsistent behaviour here. If you do it in printf(), it should
> (at least) also be done in vprintf() [and probably one should check
> the *snprintf() functions, too].
Yes you are right concerning vsprintf.
puts would output the incorrect data from the internal buffer.
The s*printf functions work on external buffer. So the caller can react
on the return code.
Regards
Heinrich
More information about the U-Boot
mailing list