AlphamaxMedia / usb-pyromaniac

Mass burner for Raspberry Pi firmware images
5 stars 3 forks source link

rewrite to use os.write() instead of dd #1

Open bunnie opened 6 years ago

bunnie commented 6 years ago

using os.write() will enable progress/performance updates on write speed instead of the static message indicating that the large partition is being written.

E3V3A commented 5 years ago

You could also try to use the dd option: status=progress, where:

The LEVEL of information to print to stderr;
'none' suppresses everything but error messages, 'noxfer' suppresses the final transfer statistics, 'progress' shows periodic transfer statistics

bunnie commented 5 years ago

I tried this, but the "progress" bar is slightly buggy -- at least on the ubuntu implementation I was testing on, the progress info doesn't print for any block size other than 512 bytes (which makes dd too slow) and even when I do get the dd progress output, for some reason the way stderr flushes I would basically get no progress output and then a full progress bar after the operation is complete.