From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-pb0-f49.google.com ([209.85.160.49]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TaQbd-0002XZ-BM for barebox@lists.infradead.org; Mon, 19 Nov 2012 12:37:42 +0000 Received: by mail-pb0-f49.google.com with SMTP id un15so3208043pbc.36 for ; Mon, 19 Nov 2012 04:37:39 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <20121119120701.GW10369@pengutronix.de> References: <1353144361-9089-1-git-send-email-antonynpavlov@gmail.com> <1353144361-9089-4-git-send-email-antonynpavlov@gmail.com> <20121119103037.GR10369@pengutronix.de> <20121119120701.GW10369@pengutronix.de> Date: Mon, 19 Nov 2012 16:37:38 +0400 Message-ID: From: Antony Pavlov List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: barebox-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: Re: [PATCH 3/3] ARM: start-pbl.c: unificate path to lib/decompress_*.c To: Sascha Hauer Cc: barebox@lists.infradead.org On 19 November 2012 16:07, Sascha Hauer wrote: > On Mon, Nov 19, 2012 at 03:34:02PM +0400, Antony Pavlov wrote: >> On 19 November 2012 14:30, Sascha Hauer wrote: >> > On Sat, Nov 17, 2012 at 01:26:01PM +0400, Antony Pavlov wrote: >> >> Signed-off-by: Antony Pavlov >> >> --- >> >> arch/arm/cpu/start-pbl.c | 2 +- >> >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> >> >> diff --git a/arch/arm/cpu/start-pbl.c b/arch/arm/cpu/start-pbl.c >> >> index 79a3cdd..c5f9705 100644 >> >> --- a/arch/arm/cpu/start-pbl.c >> >> +++ b/arch/arm/cpu/start-pbl.c >> >> @@ -66,7 +66,7 @@ extern void *input_data_end; >> >> #endif >> >> >> >> #ifdef CONFIG_IMAGE_COMPRESSION_GZIP >> >> -#include "../../../../lib/decompress_inflate.c" >> >> +#include "../../../lib/decompress_inflate.c" >> > >> > This is strange. Why did this work beforehand? >> >> Look above in the arch/arm/cpu/start-pbl.c: >> >> #ifdef CONFIG_IMAGE_COMPRESSION_LZO >> #include "../../../lib/decompress_unlzo.c" >> #endif >> >> #ifdef CONFIG_IMAGE_COMPRESSION_GZIP >> #include "../../../../lib/decompress_inflate.c" >> #endif >> >> The files decompress_inflate.c and decompress_unlzo.c are in the same >> directory. Why we use different prefixes to address them? > > I understand the patch and why it's correct. I just wondered why it > works correctly without this patch. > > ls arch/arm/cpu/../../../../lib/decompress_inflate.c > ls: cannot access arch/arm/cpu/../../../../lib/decompress_inflate.c: No such file or directory > > This is correct, we only have to go three directories up. Still it > compiles fine. IMHO we use very many '-I' options when running C compiler. Some of them make possible to include the decompres-related files with the '../../../../' prefix, the other ones make possible to use '../../../'. If you will ally the patch, please don't forget to change 'unificate' to 'unify'. -- Best regards, Antony Pavlov _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox