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

Unified Diff: user_tools/linux/recovery.sh

Issue 5705005: Applied Bill's patch to use the "raw" version of a disk if it's there. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/vboot_reference.git@master
Patch Set: Created 10 years 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: user_tools/linux/recovery.sh
diff --git a/user_tools/linux/recovery.sh b/user_tools/linux/recovery.sh
index 56b0b4ceed526ff08da61e39b3e657b6c159736b..9273076cd21bb961f6c270f09719a6efda38ad83 100755
--- a/user_tools/linux/recovery.sh
+++ b/user_tools/linux/recovery.sh
@@ -822,6 +822,12 @@ done
# Write it.
echo "copying... (this may take several minutes)"
+
+# Many BSD variants provide both normal /dev/FOO and raw /dev/rFOO devices,
+# with the raw path being much faster. If that device exists, we'll use it.
+if [ -e /dev/r${user_choice} ]; then
+ user_choice="r${user_choice}"
+fi
dd bs=4194304 of=/dev/${user_choice} if="$image_file" conv=sync ||
ufatal "Unable to write the image."
sync
« 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