From 316104f3b85c58bc0897470b19168ea1d12c37cd Mon Sep 17 00:00:00 2001
From: Assaf Gordon <assafgordon@gmail.com>
Date: Thu, 31 Mar 2016 23:07:57 -0400
Subject: [PATCH] tests: avoid non-portable printf

* tests/ln/sf-1.sh: avoid using '%0*d' in printf, as this is not
  supported on some built-in shell implementations (e.g. Busybox ash).
---
 tests/ln/sf-1.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/ln/sf-1.sh b/tests/ln/sf-1.sh
index ccf91a2..b6eb19f 100755
--- a/tests/ln/sf-1.sh
+++ b/tests/ln/sf-1.sh
@@ -35,7 +35,7 @@ esac
 # coreutils-8.22 would fail to replace {ENOTDIR,ELOOP,ENAMETOOLONG}_link below.
 name_max_plus1=$(expr $(stat -f -c %l .) + 1)
 test $name_max_plus1 -gt 1 || skip_ 'Error determining NAME_MAX'
-long_name=$(printf '%0*d' $name_max_plus1 0)
+long_name=$(printf "%0${name_max_plus1}d" 0)
 for f in '' f; do
   ln -s$f missing ENOENT_link || fail=1
   ln -s$f a/b ENOTDIR_link || fail=1
-- 
1.9.1

