Skip to contentSkip to conversation

Duplicated string prefix

RFC Gray Remlin 2 participants 2 messages May 18, 2011 – May 19, 2011

lore
Share & tools
lore
#0 lore raw

The string prefixes "*** ERROR:" and "WARNING:" (or variations thereof) is duplicated numerous times throughout u-boot.
Replacing with e.g. a 'putserr' function which prepends the string prefix to the unique part of the error message and then displays it may be a worthwhile space saving.

#1 lore raw

Hi Gray,

Quoted 5 lines

The string prefixes "*** ERROR:" and "WARNING:" (or variations thereof) is duplicated numerous times throughout u-boot.
Replacing with e.g. a 'putserr' function which prepends the string prefix to the unique part of the error message and then displays it may be a worthwhile space saving.

You should be able to tell beforehand how much this could save by analyzing the strings in a current U-Boot compile, right? This way one would know whether it makes sense to embark on that journey.

_If_ we decide to go down that route, I'd suggest using functions comparable to what Linux offers, e.g. something like pr_err, pr_warning, etc.

Cheers
Detlev

Signature · 6 lines
Perfecting oneself is as much unlearning as it is learning. 
                                        -- Edsger Dijkstra 
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de