[U-Boot] [PATCH] common: nvedit to protect additional ethernet addresses Part 1/1

Wolfgang Denk wd at denx.de
Tue Dec 16 21:55:37 CET 2008


Dear Ben,

In message <4947FFDB.9040005 at gmail.com> you wrote:
>
> >> Jerry Van Baren already showed you an elegant way to solve this using
> >> scanf().
> >
> > Is scanf() available in u-boot? I couldn't find it.
...
> I think he meant sscanf(), which should be there.

No, we don't have this yet in U-Boot.

But that's a small problem - as long as we just need to parse for  an
expression  like "eth\d*addr" we can easily do this with ten lines of
C or so.

If we find we might need sscanf() more often, we might een go as  far
and   borrow   some   200+  lines  of  code  for  Linux  (i.e.,  from
"lib/vsprintf.c") :-)

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
"Don't think; let the machine do it for you!"        - E. C. Berkeley


More information about the U-Boot mailing list