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

Issue 3608013: crosutils: refine image_to_usb progress output and performance (Closed)

Created:
10 years, 2 months ago by hungte
Modified:
9 years, 7 months ago
Reviewers:
Kenneth Waters
CC:
chromium-os-reviews_chromium.org, Mandeep Singh Baines, anush, sosa
Visibility:
Public.

Description

crosutils: refine image_to_usb progress output and performance Adding "-B 4m" to balance pipe (+10% speed on some SD) and -b to make progress more readable. Since the size report from pv (k=1024) and dd(k=1000) are different, we also disable dd's summary report to prevent confusion. BUG=none TEST=executed: ./image_to_usb.sh --from=... --to=/dev/sdX (ok) Change-Id: I184c4ce2d9a8274079ddb26f0420ccf8f2a674dd Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=7e366a5

Patch Set 1 #

Patch Set 2 : Disable dd reports to prevent confusion #

Total comments: 4

Patch Set 3 : remove trailing slash (by coding style guide) and add comments for why suppress dd report #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -1 line) Patch
M image_to_usb.sh View 1 2 1 chunk +4 lines, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
hungte
10 years, 2 months ago (2010-10-07 11:43:42 UTC) #1
Kenneth Waters
lgtm w/nits. http://codereview.chromium.org/3608013/diff/3001/4001 File image_to_usb.sh (right): http://codereview.chromium.org/3608013/diff/3001/4001#newcode240 image_to_usb.sh:240: sudo pv -ptreb -B 4m "${SRC_IMAGE}" | ...
10 years, 2 months ago (2010-10-07 16:50:50 UTC) #2
hungte
10 years, 2 months ago (2010-10-08 02:26:15 UTC) #3
http://codereview.chromium.org/3608013/diff/3001/4001
File image_to_usb.sh (right):

http://codereview.chromium.org/3608013/diff/3001/4001#newcode240
image_to_usb.sh:240: sudo pv -ptreb -B 4m "${SRC_IMAGE}" | \
(first sudo) Yes we do. If you download the images from website and moving files
around into/from chroot, the file may become owner=root. Because image_to_usb
invokes dd with sudo before, people won't notice the difference. To be backward
compatible, I'd prefer to keep the sudo for read (pv).

http://codereview.chromium.org/3608013/diff/3001/4001#newcode240
image_to_usb.sh:240: sudo pv -ptreb -B 4m "${SRC_IMAGE}" | \
On 2010/10/07 16:50:50, Kenneth Waters wrote:
> This backslash is unnecessary.
Yes, but I was trying to follow the existing style (|| \) in this script. Hmmm,
this should be discussed in the coding style thread.

Powered by Google App Engine
This is Rietveld 408576698