From patchwork Wed Mar 13 12:28:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 227263 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id CA7B02C009D for ; Wed, 13 Mar 2013 23:30:22 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 662AC8C479; Wed, 13 Mar 2013 12:30:20 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lGGHEKYkTjpi; Wed, 13 Mar 2013 12:30:18 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 5513F8C39A; Wed, 13 Mar 2013 12:30:17 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 069C08F74B for ; Wed, 13 Mar 2013 12:30:23 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 4C1018AB0F for ; Wed, 13 Mar 2013 12:30:15 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bDPnUuuBO7PX for ; Wed, 13 Mar 2013 12:30:15 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.free-electrons.com (mail.free-electrons.com [94.23.35.102]) by whitealder.osuosl.org (Postfix) with ESMTP id C31678AA8C for ; Wed, 13 Mar 2013 12:30:14 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 106) id 059F84184; Wed, 13 Mar 2013 13:30:13 +0100 (CET) Received: from localhost.localdomain (20.222.3.200.ros.express.com.ar [200.3.222.20]) by mail.free-electrons.com (Postfix) with ESMTPA id 8D5DD3FB0; Wed, 13 Mar 2013 13:29:53 +0100 (CET) From: Ezequiel Garcia To: Date: Wed, 13 Mar 2013 09:28:17 -0300 Message-Id: <1363177697-31728-2-git-send-email-ezequiel.garcia@free-electrons.com> X-Mailer: git-send-email 1.7.8.6 In-Reply-To: <1363177697-31728-1-git-send-email-ezequiel.garcia@free-electrons.com> References: <1363177697-31728-1-git-send-email-ezequiel.garcia@free-electrons.com> Subject: [Buildroot] [PATCH] fs/common.mk: Strip extra whitespace when device table is empty X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Since ROOTFS_DEVICE_TABLES it is a concatenation of two strings separated by spaces, there will always be a space on it, which means it's never empty. Therefore, when testing for empty, the condition never evaluate to false. The following change fixes this problem; it runs the qstrip on the overall combination of the variables, causing the space to be removed if it's the only thing left. Tested-by: Ezequiel Garcia Signed-off-by: Thomas De Schampheleire --- fs/common.mk | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/common.mk b/fs/common.mk index 8b5b2f2..a0b7b39 100644 --- a/fs/common.mk +++ b/fs/common.mk @@ -33,8 +33,8 @@ FAKEROOT_SCRIPT = $(BUILD_DIR)/_fakeroot.fs FULL_DEVICE_TABLE = $(BUILD_DIR)/_device_table.txt -ROOTFS_DEVICE_TABLES = $(call qstrip,$(BR2_ROOTFS_DEVICE_TABLE)) \ - $(call qstrip,$(BR2_ROOTFS_STATIC_DEVICE_TABLE)) +ROOTFS_DEVICE_TABLES = $(call qstrip,$(BR2_ROOTFS_DEVICE_TABLE) \ + $(BR2_ROOTFS_STATIC_DEVICE_TABLE)) define ROOTFS_TARGET_INTERNAL