[U-Boot] [PATCH] UBIFS: Improve error message when reading superblock failed

Albert ARIBAUD albert.u.boot at aribaud.net
Mon Feb 20 11:01:24 CET 2012


Hi Bernhard,

Le 20/02/2012 10:11, Bernhard Walle a écrit :
> Am 20.02.2012 09:59, schrieb Albert ARIBAUD:
>>
>> Dry numbers as error messages are better than no error messages but only
>> marginally IMO. Isn't there a way to emit a readable message re malloc
>> instead of emitting an int value?
>
> Well, I'm not familiar with the u-boot codebase. Does u-boot have a
> strerror table? How is it handled on other places? Should an error
> message printed directly before returning -ENOMEM?

I don't think there is an strerror() API. But at least, if the newly 
printed int uses errno values, then instead of '... %d!", you could 
print "... errno=%d", which would give some hint to the reader.

> Regards,
> Bernhard

Amicalement,
-- 
Albert.


More information about the U-Boot mailing list