From: Wolfgang Denk Date: Wed, 21 Dec 2011 11:49:30 +0100 Subject: [U-Boot] [PATCH 3/4] mkenvimage: Print program basename instead of whole path in usage() In-Reply-To: <024FE3275EF7814D9B07390F28C0832C63A240F5@vie196nt.frequentis.frq> References: <1323082526-2125-1-git-send-email-hkronsto@frequentis.com> <1323082526-2125-3-git-send-email-hkronsto@frequentis.com> <20111220225313.125E319E5E2D@gemini.denx.de> <024FE3275EF7814D9B07390F28C0832C63A240F5@vie196nt.frequentis.frq> Message-ID: <20111221104930.937B81850454@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear KRONSTORFER Horst, In message <024FE3275EF7814D9B07390F28C0832C63A240F5@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_