Applied Bill's patch to use the "raw" version of a disk if it's there.

Change-Id: I45c2283c9677d35490b5874ede20f8fe4623955d

BUG=chromium-os:10166
TEST=Ran against http://www.corp.google.com/~scottz/recovery.conf

Review URL: http://codereview.chromium.org/5705005
This commit is contained in:
Doug Anderson
2010-12-10 15:03:35 -08:00
parent 04d9975aa2
commit bcafe0cb09

View File

@@ -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