[U-Boot] [PATCH 3/4] mkenvimage: Print program basename instead of whole path in usage()

Wolfgang Denk wd at denx.de
Wed Dec 21 11:49:30 CET 2011


Dear KRONSTORFER Horst,

In message <024FE3275EF7814D9B07390F28C0832C63A240F5 at vie196nt.frequentis.frq> you wrote:
>
> > > +	/* Parse program basename */
> > > +	prg = strrchr(argv[0], '/');
> > > +	prg = (prg) ? prg + 1 : argv[0];
> > 
> > Any reason for not using basename() here?
> 
> i'm just used to not using basename() ... do you want an updated patch?

Yes, please.  Using available standard functions is always better than
reinventing the wheel.

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
Unix is supported by IBM, like a hanging man is supported by rope.
		        - Don Libes & Sandy Ressler: _Life With Unix_


More information about the U-Boot mailing list