On Wed, 16 Aug 2017 at 22:02, David Hendricks <david.hendricks(a)gmail.com> wrote:
> The short answer is yes. Nico also briefly mentioned an idea on IRC to use a mechanism similar to flashrom_set_log_callback() to avoid complicating function signatures for the read, write, and verify functions.
Dragging up an email thread from a long time ago, apologies. We're
finally using libflashrom via fwupd "in production" so to speak. One
glaring problem is that the UI "freezes" when we're doing operations
with libflashrom, which we've worked around with just making the
progress bar spin up and down so at least it looks like the program
has not crashed. Of course, the correct thing to do is return the
progress information because, as David says, some flash chips take a
looong time to write.
I've attached a patch for some initial comments, if this looks
acceptable I can add some more callbacks in other flash
implementations (as at the moment I've only covered SPI stuff) but I
didn't want to spend time on a mega patch before I had some kind of
initial thumbs-up. Comments welcome. Thanks.
Richard.