From patchwork Wed Sep 23 13:01:26 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Roth X-Patchwork-Id: 34164 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id A39E2B70B3 for ; Wed, 23 Sep 2009 23:45:29 +1000 (EST) Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1MqS7n-0004uO-LF; Wed, 23 Sep 2009 13:43:15 +0000 Received: from monster.nessie.de ([84.200.20.120]) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1MqS7f-0004sZ-0C for linux-mtd@lists.infradead.org; Wed, 23 Sep 2009 13:43:12 +0000 Received: from nautilus.home (localhost.localdomain [127.0.0.1]) by monster.nessie.de (Postfix) with ESMTP id E3D9E2188B5E for ; Wed, 23 Sep 2009 13:01:36 +0000 (GMT) Received: by nautilus.home (Postfix, from userid 1000) id 5F36C360043; Wed, 23 Sep 2009 15:01:36 +0200 (CEST) From: Michael Roth To: linux-mtd@lists.infradead.org Subject: [PATCH] ubiformat, ubinize: fix more 64-bit image sequence number confusion Date: Wed, 23 Sep 2009 15:01:26 +0200 Message-Id: <1253710887-16731-2-git-send-email-mroth@nessie.de> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1253710887-16731-1-git-send-email-mroth@nessie.de> References: <1253710887-16731-1-git-send-email-mroth@nessie.de> X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.5 (LGPL) ) MR-646709E3 X-CRM114-CacheID: sfid-20090923_094307_607230_F37AA90C X-CRM114-Status: UNSURE ( 9.75 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.2.5 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- _SUMMARY_ Cc: Michael Roth X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org The sequence number is only 32 bit as the strtoul() function. Signed-off-by: Michael Roth --- ubi-utils/src/ubiformat.c | 2 +- ubi-utils/src/ubinize.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ubi-utils/src/ubiformat.c b/ubi-utils/src/ubiformat.c index 345593c..bed0339 100644 --- a/ubi-utils/src/ubiformat.c +++ b/ubi-utils/src/ubiformat.c @@ -134,7 +134,7 @@ static int parse_opt(int argc, char * const argv[]) while (1) { int key; char *endp; - unsigned long long image_seq; + unsigned long int image_seq; key = getopt_long(argc, argv, "nh?Vyqve:x:s:O:f:S:", long_options, NULL); if (key == -1) diff --git a/ubi-utils/src/ubinize.c b/ubi-utils/src/ubinize.c index dd8d3ed..a46833c 100644 --- a/ubi-utils/src/ubinize.c +++ b/ubi-utils/src/ubinize.c @@ -161,7 +161,7 @@ static int parse_opt(int argc, char * const argv[]) while (1) { int key; char *endp; - unsigned long long image_seq; + unsigned long int image_seq; key = getopt_long(argc, argv, "o:p:m:s:O:e:x:Q:vhV", long_options, NULL); if (key == -1)