summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorSøren Holm <sgh@sgh.dk>2013-10-29 00:16:49 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-10-30 17:33:01 +0000
commit1350b461ed0c9d4afa1ab909a5b1ff60fb160c97 (patch)
treeb16b7c2179dd8468a83f5b9b879bd53e9976525d /meta
parent9df8591a6e18afa592673cb454dc699a1341461d (diff)
downloadopenembedded-core-1350b461ed0c9d4afa1ab909a5b1ff60fb160c97.tar.gz
openembedded-core-1350b461ed0c9d4afa1ab909a5b1ff60fb160c97.tar.bz2
openembedded-core-1350b461ed0c9d4afa1ab909a5b1ff60fb160c97.zip
e2fsprogs: Escape filenames in populate-extfs.sh
Without this patch filenames containing spaces do not get into the final ext2/3/4 filsystem. [YOCTO #5401] Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/populate-extfs.sh20
1 files changed, 10 insertions, 10 deletions
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/populate-extfs.sh b/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/populate-extfs.sh
index 9eff030820..7de720b115 100644
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/populate-extfs.sh
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/populate-extfs.sh
@@ -35,7 +35,7 @@ DEBUGFS="debugfs"
fi
# Only stat once since stat is a time consuming command
- STAT=$(stat -c "TYPE=\"%F\";DEVNO=\"0x%t 0x%T\";MODE=\"%f\";U=\"%u\";G=\"%g\"" $FILE)
+ STAT=$(stat -c "TYPE=\"%F\";DEVNO=\"0x%t 0x%T\";MODE=\"%f\";U=\"%u\";G=\"%g\"" "$FILE")
eval $STAT
case $TYPE in
@@ -43,20 +43,20 @@ DEBUGFS="debugfs"
echo "mkdir $TGT"
;;
"regular file" | "regular empty file")
- echo "write $FILE $TGT"
+ echo "write \"$FILE\" \"$TGT\""
;;
"symbolic link")
- LINK_TGT=$(readlink $FILE)
- echo "symlink $TGT $LINK_TGT"
+ LINK_TGT=$(readlink "$FILE")
+ echo "symlink \"$TGT\" \"$LINK_TGT\""
;;
"block special file")
- echo "mknod $TGT b $DEVNO"
+ echo "mknod \"$TGT\" b $DEVNO"
;;
"character special file")
- echo "mknod $TGT c $DEVNO"
+ echo "mknod \"$TGT\" c $DEVNO"
;;
"fifo")
- echo "mknod $TGT p"
+ echo "mknod \"$TGT\" p"
;;
*)
echo "Unknown/unhandled file type '$TYPE' file: $FILE" 1>&2
@@ -64,11 +64,11 @@ DEBUGFS="debugfs"
esac
# Set the file mode
- echo "sif $TGT mode 0x$MODE"
+ echo "sif \"$TGT\" mode 0x$MODE"
# Set uid and gid
- echo "sif $TGT uid $U"
- echo "sif $TGT gid $G"
+ echo "sif \"$TGT\" uid $U"
+ echo "sif \"$TGT\" gid $G"
done
# Handle the hard links.