fs/common.mk: Strip extra whitespace when device table is empty
authorEzequiel Garcia <ezequiel.garcia@free-electrons.com>
Wed, 13 Mar 2013 02:28:16 +0000 (02:28 +0000)
committerPeter Korsgaard <jacmet@sunsite.dk>
Wed, 13 Mar 2013 22:09:40 +0000 (23:09 +0100)
Since ROOTFS_DEVICE_TABLES is a concatenation of two strings separated by
spaces, there will always be a space in 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 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 <ezequiel.garcia@free-electrons.com>
Signed-off-by: Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
fs/common.mk

index 8b5b2f2e8601cecd2fa5c7a253900c05a756e264..a0b7b3909c685a5889c6281a8a97672ab15fd348 100644 (file)
@@ -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