[oe-commits] [openembedded-core] 09/41: image-vm: Avoid use of fold, tac and paste commands for DISK_SIGNATURE
git at git.openembedded.org
git at git.openembedded.org
Sun Jun 11 09:58:55 UTC 2017
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit 1103e2630d37643811f1fa8c55fe973368c3d9b3
Author: Jonathan Liu <net147 at gmail.com>
AuthorDate: Thu Jun 8 21:07:54 2017 +1000
image-vm: Avoid use of fold, tac and paste commands for DISK_SIGNATURE
These commands are not whitelisted by the HOSTTOOLS variable which
silently prevents the MBR disk signature from being written to the
image.
Reported-by: Michael Davis <michael.davis at essvote.com>
Signed-off-by: Jonathan Liu <net147 at gmail.com>
Signed-off-by: Ross Burton <ross.burton at intel.com>
---
meta/classes/image-vm.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/classes/image-vm.bbclass b/meta/classes/image-vm.bbclass
index 35c9244..98bd920 100644
--- a/meta/classes/image-vm.bbclass
+++ b/meta/classes/image-vm.bbclass
@@ -93,7 +93,7 @@ build_boot_dd() {
parted $IMAGE print
- awk "BEGIN { printf \"$(echo ${DISK_SIGNATURE} | fold -w 2 | tac | paste -sd '' | sed 's/\(..\)/\\x&/g')\" }" | \
+ awk "BEGIN { printf \"$(echo ${DISK_SIGNATURE} | sed 's/\(..\)\(..\)\(..\)\(..\)/\\x\4\\x\3\\x\2\\x\1/')\" }" | \
dd of=$IMAGE bs=1 seek=440 conv=notrunc
OFFSET=`expr $END2 / 512`
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list