summaryrefslogtreecommitdiffstats
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:13 +0000
commit1b8bd9e6122de0e740c137ac9fbe1267dbc9e4c8 (patch)
treee143645a8f996b5d690b9dbcae6959c0d7a01b66 /meta
parent6ab2d4649210fbf2c802c53a33f664237800dc49 (diff)
downloadpoky-1b8bd9e6122de0e740c137ac9fbe1267dbc9e4c8.tar.gz
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] (From OE-Core rev: 1350b461ed0c9d4afa1ab909a5b1ff60fb160c97) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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"
35 fi 35 fi
36 36
37 # Only stat once since stat is a time consuming command 37 # Only stat once since stat is a time consuming command
38 STAT=$(stat -c "TYPE=\"%F\";DEVNO=\"0x%t 0x%T\";MODE=\"%f\";U=\"%u\";G=\"%g\"" $FILE) 38 STAT=$(stat -c "TYPE=\"%F\";DEVNO=\"0x%t 0x%T\";MODE=\"%f\";U=\"%u\";G=\"%g\"" "$FILE")
39 eval $STAT 39 eval $STAT
40 40
41 case $TYPE in 41 case $TYPE in
@@ -43,20 +43,20 @@ DEBUGFS="debugfs"
43 echo "mkdir $TGT" 43 echo "mkdir $TGT"
44 ;; 44 ;;
45 "regular file" | "regular empty file") 45 "regular file" | "regular empty file")
46 echo "write $FILE $TGT" 46 echo "write \"$FILE\" \"$TGT\""
47 ;; 47 ;;
48 "symbolic link") 48 "symbolic link")
49 LINK_TGT=$(readlink $FILE) 49 LINK_TGT=$(readlink "$FILE")
50 echo "symlink $TGT $LINK_TGT" 50 echo "symlink \"$TGT\" \"$LINK_TGT\""
51 ;; 51 ;;
52 "block special file") 52 "block special file")
53 echo "mknod $TGT b $DEVNO" 53 echo "mknod \"$TGT\" b $DEVNO"
54 ;; 54 ;;
55 "character special file") 55 "character special file")
56 echo "mknod $TGT c $DEVNO" 56 echo "mknod \"$TGT\" c $DEVNO"
57 ;; 57 ;;
58 "fifo") 58 "fifo")
59 echo "mknod $TGT p" 59 echo "mknod \"$TGT\" p"
60 ;; 60 ;;
61 *) 61 *)
62 echo "Unknown/unhandled file type '$TYPE' file: $FILE" 1>&2 62 echo "Unknown/unhandled file type '$TYPE' file: $FILE" 1>&2
@@ -64,11 +64,11 @@ DEBUGFS="debugfs"
64 esac 64 esac
65 65
66 # Set the file mode 66 # Set the file mode
67 echo "sif $TGT mode 0x$MODE" 67 echo "sif \"$TGT\" mode 0x$MODE"
68 68
69 # Set uid and gid 69 # Set uid and gid
70 echo "sif $TGT uid $U" 70 echo "sif \"$TGT\" uid $U"
71 echo "sif $TGT gid $G" 71 echo "sif \"$TGT\" gid $G"
72 done 72 done
73 73
74 # Handle the hard links. 74 # Handle the hard links.