From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Kocialkowski Date: Mon, 15 Jun 2015 21:36:38 +0200 Subject: [U-Boot] [PATCH v2 2/3] common: cmd_part: start and size sub-commands introduction In-Reply-To: <20150615160210.GY1728@bill-the-cat> References: <1434184697-23410-1-git-send-email-contact@paulk.fr> <1434184697-23410-3-git-send-email-contact@paulk.fr> <557EE863.8030501@wwwdotorg.org> <20150615160210.GY1728@bill-the-cat> Message-ID: <1434396998.2324.55.camel@collins> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Le lundi 15 juin 2015 ? 12:02 -0400, Tom Rini a ?crit : > On Mon, Jun 15, 2015 at 08:59:47AM -0600, Stephen Warren wrote: > > On 06/13/2015 02:38 AM, Paul Kocialkowski wrote: > > >This introduces the part start and part size sub-commands. The purpose of these > > >is to store the start block and size of a partition in a variable, given the > > >device and partition number. > > > > > >This allows reading raw data that fits a single partition more easily. > > >For instance, this could be used to figure out the start block and size of a > > >kernel partition when a partition table is present, given the partition number. > > > > Patches 1 and 2, > > Acked-by: Stephen Warren > > > > One minor comment here though: > > > > >diff --git a/common/cmd_part.c b/common/cmd_part.c > > > > >+static int do_part_start(int argc, char * const argv[]) > > > > >+ if (argc < 4) > > >+ return CMD_RET_USAGE; > > ... > > >+ snprintf(buf, sizeof(buf), "0x%lx", info.start); > > >+ setenv(argv[3], buf); > > > > It would be nice if the variable name parameter to this command (and > > part size) were optional, just like it is in "part uuid". This would > > make it simpler to run the command interactively while > > experimenting. > > Yes. Also numbers are hex by default in U-Boot so we don't need the 0x > here. Thanks for the reminder. v3 doesn't include the 0x. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: This is a digitally signed message part URL: