From: Kim Phillips Date: Sat, 12 Feb 2011 16:17:15 -0600 Subject: [U-Boot] [PATCH v3] mkimage: add "-V" option to print version information In-Reply-To: <20110212093716.77A471519FD@gemini.denx.de> References: <1297414591-12987-1-git-send-email-wd@denx.de> <1297464103-9111-1-git-send-email-wd@denx.de> <20110211171117.b9b05b01.kim.phillips@freescale.com> <20110212093716.77A471519FD@gemini.denx.de> Message-ID: <20110212161715.111c368f.kim.phillips@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Sat, 12 Feb 2011 10:37:16 +0100 Wolfgang Denk wrote: > Dear Kim Phillips, > > In message <20110211171117.b9b05b01.kim.phillips@freescale.com> you wrote: > > On Fri, 11 Feb 2011 23:41:43 +0100 > > Wolfgang Denk wrote: > > > > > + case 'V': > > > + /* > > > + * Skip the "U-Boot " part in > > > + * U_BOOT_VERSION by adding 7 > > > + */ > > > + printf("mkimage version %s\n", > > > + U_BOOT_VERSION + 7); > > > > I'd have done it without magic nor comments as > > > > U_BOOT_VERSION[sizeof("U-Boot ") + 1] > > > > or even > > > > U_BOOT_VERSION[strlen("U-Boot ")] > > Hm... I would have cleaned up such locations in U-Boot as part of my > v4 patch that introduces PLAIN_VERSION - if I had found any such > code. Am I missing something? ok, apart from the missing & and +/- gaffes, what are you talking about? The code does exactly what the + 7 does, except it's more self-explanatory. Kim