From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Mon, 20 Feb 2012 11:01:24 +0100 Subject: [U-Boot] [PATCH] UBIFS: Improve error message when reading superblock failed In-Reply-To: <4F420E33.3000002@corscience.de> References: <20120217143110.GA32414@agamemnon.er.corscience.de> <1329727489-31423-1-git-send-email-walle@corscience.de> <4F420B82.2070908@aribaud.net> <4F420E33.3000002@corscience.de> Message-ID: <4F4219F4.3080005@aribaud.net> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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.