From: "Søren Holm" <sgh@sgh.dk>
To: yocto@yoctoproject.org
Subject: [PATCH] e2fsprogs: Escape filenames in populate-extfs.sh
Date: Tue, 29 Oct 2013 00:11:04 +0100 [thread overview]
Message-ID: <1383001864-4366-1-git-send-email-sgh@sgh.dk> (raw)
[YOCTO #5401]
---
.../e2fsprogs/e2fsprogs-1.42.8/populate-extfs.sh | 20 ++++++++++----------
1 file 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 9eff030..7de720b 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.
--
1.8.3.2
next reply other threads:[~2013-10-28 23:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-28 23:11 Søren Holm [this message]
2013-10-28 23:15 ` [PATCH] e2fsprogs: Escape filenames in populate-extfs.sh Søren Holm
2013-10-28 23:16 ` Søren Holm
2013-11-01 11:11 ` Burton, Ross
2013-11-01 11:14 ` Søren Holm
2013-11-01 11:57 ` Burton, Ross
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1383001864-4366-1-git-send-email-sgh@sgh.dk \
--to=sgh@sgh.dk \
--cc=yocto@yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.