Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Unified Diff: common.sh

Issue 3997001: common.sh: switch out echo -ne for printf and fix incorrect offset (Closed) Base URL: http://git.chromium.org/git/crosutils.git
Patch Set: ugh and fix a last minute bug! Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: common.sh
diff --git a/common.sh b/common.sh
index 24862aa4078d19d32a858664e591a3eae7673122..9a9699ede7f5d44a22823bbf148046cfc138c754 100644
--- a/common.sh
+++ b/common.sh
@@ -475,8 +475,8 @@ setup_symlinks_on_root() {
disable_rw_mount() {
local rootfs="$1"
local offset="${2-0}" # in bytes
- local ro_compat_offset=$((0x467 + 3)) # Set 'highest' byte
- echo -ne '\xff' |
+ local ro_compat_offset=$((0x464 + 3)) # Set 'highest' byte
+ printf '\377' |
sudo dd of="$rootfs" seek=$((offset + ro_compat_offset)) \
conv=notrunc count=1 bs=1
}
@@ -484,8 +484,8 @@ disable_rw_mount() {
enable_rw_mount() {
local rootfs="$1"
local offset="${2-0}"
- local ro_compat_offset=$((0x467 + 3)) # Set 'highest' byte
- echo -ne '\x00' |
+ local ro_compat_offset=$((0x464 + 3)) # Set 'highest' byte
+ printf '\000' |
sudo dd of="$rootfs" seek=$((offset + ro_compat_offset)) \
conv=notrunc count=1 bs=1
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698