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

Unified Diff: update_kernel.sh

Issue 6628027: update_kernel: fix to be not rely on kernel command-line (Closed) Base URL: http://git.chromium.org/git/crosutils.git@master
Patch Set: Fix. Created 9 years, 10 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: update_kernel.sh
diff --git a/update_kernel.sh b/update_kernel.sh
index b5cb818b4336b240c8c90525d1908e27bc3fcd94..6d0e61ba489717475a47464590961ec325e71847 100755
--- a/update_kernel.sh
+++ b/update_kernel.sh
@@ -62,8 +62,12 @@ function learn_device() {
# Ask the target what the kernel partition is
function learn_partition() {
[ -n "${FLAGS_partition}" ] && return
- remote_sh cat /proc/cmdline
- if echo "${REMOTE_OUT}" | egrep -q "${FLAGS_device}3"; then
+ ! remote_sh rootdev
+ if [ "${REMOTE_OUT}" == "/dev/dm-0" ]; then
+ remote_sh ls /sys/block/dm-0/slaves
+ REMOTE_OUT="/dev/${REMOTE_OUT}"
+ fi
+ if [ "${REMOTE_OUT}" == "${FLAGS_device}3" ]; then
FLAGS_partition="${FLAGS_device}2"
else
FLAGS_partition="${FLAGS_device}4"
« 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