summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
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-12-12 17:00:08 +0000
commit9be52e5f42094da9fb820a7aef871d5f7ef9e077 (patch)
tree450f922cfc712a2ced967bc29a820dd133618254 /meta/recipes-devtools
parent9134463e4d823284bf4abf8cc68b06175f216fe5 (diff)
downloadpoky-9be52e5f42094da9fb820a7aef871d5f7ef9e077.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 master rev: 1350b461ed0c9d4afa1ab909a5b1ff60fb160c97) (From OE-Core rev: 62d01b10508f86ca825ebc24773dfa2b485b4292) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-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.