[U-Boot] putc

Wolfgang Denk wd at denx.de
Thu Nov 13 21:51:28 CET 2014


Dear Simon,

In message <CAPnjgZ1hKpGUCqU8D36VXm14jg_Xv=Q1qUh+kpnamJX6834_Yg at mail.gmail.com> you wrote:
> 
> > Adding a parameter to these exported functions will break backward
> > compatibility
> > of existing standalone apps
> 
> Yes that's right, but when they move to a newer U-Boot they will need
> to be updated. Isn't that expected with standalone apps? I can adjust
> things that are in the mainline tree, but I can't fix up people's
> third party apps.

Backard compatibility has never been an issue with SA applications.
The design intentionally introduced the XF_VERSION number (see
include/exports.h) which just has to be incremented to signalize
interface changes.

But then, putc() is a stdio function with well-known synopsis, and
this should never be changed.

> I did make a suggestion about how to avoid adding the extra parameter
> (changing the behaviour to call putc() instead of dev->putc()). What
> do you think?

Sounds better to me.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Every program has at least one bug and can be shortened by  at  least
one  instruction  --  from  which,  by induction, one can deduce that
every program can be reduced to one instruction which doesn't work.


More information about the U-Boot mailing list