build: image: use printf for ModelNameLimit16
[openwrt/staging/hauke.git] / include / image-commands.mk
index 6fe2890a1af51c9459acccf0c95843329fa27556..6b4bc4945cbe2a4b846dc5b5503107603c10cd00 100644 (file)
@@ -4,7 +4,7 @@ IMAGE_KERNEL = $(word 1,$^)
 IMAGE_ROOTFS = $(word 2,$^)
 
 define ModelNameLimit16
-$(shell expr substr "$(word 2, $(subst _, ,$(1)))" 1 16)
+$(shell printf %.16s "$(word 2, $(subst _, ,$(1)))")
 endef
 
 define rootfs_align