From patchwork Fri Jan 31 08:28:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfgang Denk X-Patchwork-Id: 315524 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id A2A562C00BC for ; Fri, 31 Jan 2014 19:28:55 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4E23F4B579; Fri, 31 Jan 2014 09:28:52 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8pbmQe2DLj2C; Fri, 31 Jan 2014 09:28:51 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7E0C14B56D; Fri, 31 Jan 2014 09:28:50 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BD9414B56D for ; Fri, 31 Jan 2014 09:28:46 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id E3cnBE8pppKr for ; Fri, 31 Jan 2014 09:28:43 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by theia.denx.de (Postfix) with ESMTPS id B5D154B56C for ; Fri, 31 Jan 2014 09:28:40 +0100 (CET) Received: from frontend1.mail.m-online.net (frontend1.mail.intern.m-online.net [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 3fFs5d4FGWz3hj5V; Fri, 31 Jan 2014 09:28:36 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 3fFs5b71qmzbbfK; Fri, 31 Jan 2014 09:28:35 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from smtp-auth.mnet-online.de ([192.168.8.180]) by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavisd-new, port 10024) with ESMTP id LlgRgicmCtYH; Fri, 31 Jan 2014 09:28:34 +0100 (CET) X-Auth-Info: IDPiC/RBpgXJ0P6N04WIgorCpjPV6bxyjZd4H6v1ytQ= Received: from diddl.denx.de (host-80-81-18-216.customer.m-online.net [80.81.18.216]) by smtp-auth.mnet-online.de (Postfix) with ESMTPA; Fri, 31 Jan 2014 09:28:34 +0100 (CET) Received: from gemini.denx.de (unknown [10.0.0.2]) by diddl.denx.de (Postfix) with ESMTP id B4AFE1A9959; Fri, 31 Jan 2014 09:28:34 +0100 (CET) Received: by gemini.denx.de (Postfix, from userid 500) id 902F838554E; Fri, 31 Jan 2014 09:28:34 +0100 (MET) From: Wolfgang Denk To: u-boot@lists.denx.de Date: Fri, 31 Jan 2014 09:28:25 +0100 Message-Id: <1391156905-21785-1-git-send-email-wd@denx.de> X-Mailer: git-send-email 1.8.5.3 Cc: Stephen Warren , Uma Shankar Subject: [U-Boot] [PATCH] EXT4: Fix number base handling of "ext4write" command X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Unlike other commands (for example, "fatwrite"), ext4write would interpret the "sizebytes" as decimal number. This is not only inconsistend and unexpected to most users, it also breaks usage like this: tftp ${addr} ${name} ext4write mmc 0:2 ${addr} ${filename} ${filesize} Change this to use the standard notation of base 16 input format. See also commit b770e88 WARNING: this is a change to the user interface!! Signed-off-by: Wolfgang Denk Cc: Uma Shankar Cc: Stephen Warren --- common/cmd_ext4.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/cmd_ext4.c b/common/cmd_ext4.c index 8289d25..68b047b 100644 --- a/common/cmd_ext4.c +++ b/common/cmd_ext4.c @@ -79,8 +79,8 @@ int do_ext4_write(cmd_tbl_t *cmdtp, int flag, int argc, /* get the address in hexadecimal format (string to int) */ ram_address = simple_strtoul(argv[3], NULL, 16); - /* get the filesize in base 10 format */ - file_size = simple_strtoul(argv[5], NULL, 10); + /* get the filesize in hexadecimal format */ + file_size = simple_strtoul(argv[5], NULL, 16); /* set the device as block device */ ext4fs_set_blk_dev(dev_desc, &info);