[U-Boot] [PATCH v6 2/2] common: Generic firmware loader for file system
Marek Vasut
marex at denx.de
Mon Jan 22 12:41:34 UTC 2018
On 01/22/2018 08:11 AM, Chee, Tien Fong wrote:
[...]
>>> This is last line code of the function, so it's always return the
>>> result regardless error or not.
>> You are rewriting the true error code with -ENODEV instead of
>> propagating it.
>>
> Ohh....are you saying to change the codes as shown in below:
>
> err = usb_stor_scan(1);
> if (err)
> return err;
Right
[...]
>>>>> +static int umount_ubifs(void)
>>>>> +{
>>>>> + return run_command("ubifsumount", 0);
>>>> Just call the function directly ?
>>>>
>>> There are some checking like ubifs_initialized in the cmd/ubifs.c.
>>> Direct callng the function would bypass those checking.
>> Then factor those out into a function you can all and call that
>> function.
>>
> Just for curious, is it worth to factor those into a function? Does it
> help to boost the performance or for other purpose?
It just makes no sense to involve the whole command machinery if you can
call a function which does exactly the same.
[...]
--
Best regards,
Marek Vasut
More information about the U-Boot
mailing list