From patchwork Mon Apr 18 08:31:47 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Shevchenko Andriy (EXT-Teleca/Helsinki)" X-Patchwork-Id: 91699 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 378FAB6FB6 for ; Mon, 18 Apr 2011 18:29:38 +1000 (EST) Received: from canuck.infradead.org ([2001:4978:20e::1]) by bombadil.infradead.org with esmtps (Exim 4.72 #1 (Red Hat Linux)) id 1QBjoh-0001pQ-40; Mon, 18 Apr 2011 08:28:19 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1QBjof-0000u3-IO; Mon, 18 Apr 2011 08:28:17 +0000 Received: from smtp.nokia.com ([147.243.128.24] helo=mgw-da01.nokia.com) by canuck.infradead.org with esmtps (Exim 4.72 #1 (Red Hat Linux)) id 1QBjoY-0000tj-PD for linux-mtd@lists.infradead.org; Mon, 18 Apr 2011 08:28:14 +0000 Received: from nokia.com (localhost [127.0.0.1]) by mgw-da01.nokia.com (Switch-3.4.3/Switch-3.4.3) with ESMTP id p3I8S7gi006247 for ; Mon, 18 Apr 2011 11:28:08 +0300 Received: from fs-test.research.nokia.com ([esdhcp05135.research.nokia.com [172.21.51.35]]) by mgw-da01.nokia.com with ESMTP id p3I8Rx7F005851 ; Mon, 18 Apr 2011 11:28:01 +0300 Received: by fs-test.research.nokia.com (Postfix, from userid 1001) id 7DBB2D0548; Mon, 18 Apr 2011 11:31:50 +0300 (EEST) From: Andy Shevchenko To: Artem Bityutskiy , linux-mtd@lists.infradead.org Subject: [PATCHv2 1/2] serve_image: adjust classificator and type for printf Date: Mon, 18 Apr 2011 11:31:47 +0300 Message-Id: <802c3655ae5130e95b01e5004710f206a3d9ef9c.1303115468.git.ext-andriy.shevchenko@nokia.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1302783893.2796.27.camel@localhost> References: <1302783893.2796.27.camel@localhost> X-Nokia-AV: Clean X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110418_042810_977574_F01F9BDD X-CRM114-Status: GOOD ( 10.01 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [147.243.128.24 listed in list.dnswl.org] 0.0 TVD_RCVD_SPACE_BRACKET TVD_RCVD_SPACE_BRACKET -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain Cc: Andy Shevchenko 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 argument type of printf is __off64_t, meanwhile the classificator is "%ld". Signed-off-by: Andy Shevchenko --- serve_image.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/serve_image.c b/serve_image.c index f8f28a1..d86e372 100644 --- a/serve_image.c +++ b/serve_image.c @@ -126,8 +126,9 @@ int main(int argc, char **argv) } if (st.st_size % erasesize) { - fprintf(stderr, "Image size %ld bytes is not a multiple of erasesize %d bytes\n", - st.st_size, erasesize); + fprintf(stderr, "Image size %llu bytes is not a multiple of " + "erasesize %d bytes\n", + (unsigned long long)st.st_size, erasesize); exit(1); } image = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, rfd, 0);