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

Albert ARIBAUD
2012-02-20T10:01:24Z

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.