]> git.ozlabs.org Git - petitboot/commit
discover/device-handler: Add aggregated download progress updates
authorSamuel Mendoza-Jonas <sam@mendozajonas.com>
Fri, 16 Dec 2016 05:03:48 +0000 (16:03 +1100)
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>
Tue, 20 Dec 2016 05:40:21 +0000 (16:40 +1100)
commit78819395e5aa0dbd0c484f7a2512fcf04b87bbf2
tree30997019249050238e726935b62cd53fd347c6f7
parentca11198f4034266b0f48b37e5871c44d1399aba6
discover/device-handler: Add aggregated download progress updates

Several processes run by Petitboot output progress information while
running. Add device_handler_status_download() which process callers can
call to register and update progress information (percentage and current
size).
A list of 'progress_info' structs holds this progress information, and
on each call to device_handler_status_download() the information is
combined and displayed as a single status update for readability.
On completion device_handler_status_download_remove() is called to
remove old progress information from the list.

Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
discover/device-handler.c
discover/device-handler.h