
20 Feb
2012
20 Feb
'12
11:01 a.m.
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.