[LEDE-DEV] [PATCH] initramfs: Escape colons in depfile
Michal Marek
mmarek at suse.com
Fri Sep 23 01:35:40 PDT 2016
Special characters are problematic in depfiles, but we can fix colons
easily.
Reported-by: Florian Fainelli <f.fainelli at gmail.com>
Signed-off-by: Michal Marek <mmarek at suse.com>
---
scripts/gen_initramfs_list.sh | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/scripts/gen_initramfs_list.sh b/scripts/gen_initramfs_list.sh
index 17fa901418ae..0055b07b03b6 100755
--- a/scripts/gen_initramfs_list.sh
+++ b/scripts/gen_initramfs_list.sh
@@ -97,7 +97,10 @@ print_mtime() {
}
list_parse() {
- [ ! -L "$1" ] && echo "$1 \\" || :
+ if [ -L "$1" ]; then
+ return
+ fi
+ echo "$1" | sed 's/:/\\:/g; s/$/ \\/'
}
# for each file print a line in following format
--
2.6.6
More information about the Lede-dev
mailing list