[PATCH] configure: use simpler/more portable echo_n

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The `echo -n` behavior is not in POSIX and not all shells support it.
Use the portable `printf` func as defined by POSIX.
---
 lib/configure | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/lib/configure b/lib/configure
index 7d4cec85fd2c..363f5b486c07 100755
--- a/lib/configure
+++ b/lib/configure
@@ -6,12 +6,7 @@ LC_ALL=C
 export LC_ALL
 
 echo_n() {
-	if [ -n "$BASH" ]
-	then
-		echo -n "$*"
-	else
-		echo "$*\c"
-	fi
+	printf '%s' "$*"
 }
 
 if [ -z "$VERSION" -o -z "$IDSDIR" ] ; then
-- 
2.8.2

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux