From patchwork Mon Sep 19 11:25:21 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 115334 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id E02ACB70B2 for ; Mon, 19 Sep 2011 22:53:17 +1000 (EST) Received: from canuck.infradead.org ([134.117.69.58]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1R5dLS-0007AX-Ce; Mon, 19 Sep 2011 12:53:10 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1R5bzk-0001rY-8H; Mon, 19 Sep 2011 11:26:40 +0000 Received: from mga09.intel.com ([134.134.136.24]) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1R5bzh-0001rG-Nj for linux-mtd@lists.infradead.org; Mon, 19 Sep 2011 11:26:38 +0000 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 19 Sep 2011 04:26:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.67,352,1309762800"; d="scan'208";a="49852797" Received: from unknown (HELO smile) ([10.255.14.174]) by orsmga001.jf.intel.com with ESMTP; 19 Sep 2011 04:26:32 -0700 Received: from andy by smile with local (Exim 4.76) (envelope-from ) id 1R5bzN-0002b0-Gm; Mon, 19 Sep 2011 14:26:17 +0300 From: Andy Shevchenko To: Artem Bityutskiy , linux-mtd@lists.infradead.org Subject: [PATCH 4/7] jffs2reader: get rid of linker error Date: Mon, 19 Sep 2011 14:25:21 +0300 Message-Id: <2f04ae27d2325fc2b3e6e5608691868367897579.1316431431.git.andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110919_072637_917817_582A073E X-CRM114-Status: GOOD ( 14.20 ) X-Spam-Score: -2.8 (--) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-2.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [134.134.136.24 listed in list.dnswl.org] -0.5 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain Cc: Alexey Dokuchaev , 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 There is a linker errors: undefined reference to `target_endian' This patch fixes the issue and turns on the jffs2reader build in the Makefile. Signed-off-by: Alexey Dokuchaev Signed-off-by: Andy Shevchenko --- Makefile | 2 +- jffs2reader.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/Makefile b/Makefile index 5a0044b..f067d86 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ MTD_BINS = \ nftldump nftl_format docfdisk \ rfddump rfdformat \ serve_image recv_image \ - sumtool #jffs2reader + sumtool jffs2reader UBI_BINS = \ ubiupdatevol ubimkvol ubirmvol ubicrc32 ubinfo ubiattach \ ubidetach ubinize ubiformat ubirename mtdinfo ubirsvol diff --git a/jffs2reader.c b/jffs2reader.c index 9aee92c..52f8d34 100644 --- a/jffs2reader.c +++ b/jffs2reader.c @@ -102,6 +102,8 @@ struct dir { char name[256]; }; +int target_endian = __BYTE_ORDER; + void putblock(char *, size_t, size_t *, struct jffs2_raw_inode *); struct dir *putdir(struct dir *, struct jffs2_raw_dirent *); void printdir(char *o, size_t size, struct dir *d, char *path,