mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-03 23:13:18 +02:00
Revert "libflashrom: Return progress state to the library user"
This reverts commit 40892b0c08
.
The feature of returning progress for libflashrom users was
introduced in original commit, however later a bug was found and
reported as https://ticket.coreboot.org/issues/390.
Reverting in a release branch to unblock release candidate, since
it is unknown how much time needed to fix the bug. Meanwhile the
feature remains in a master branch and will be fixed under
ticket 390.
TEST=scenarios below run successfully
1) flashrom -h does not show --progress
2) flashrom -p dummy:emulate=W25Q128FV -r /tmp/dump.bin
3) flashrom -p dummy:emulate=W25Q128FV -v /tmp/dump.bin
4) flashrom -p dummy:emulate=W25Q128FV -E
5) head -c 16777216 </dev/urandom >/tmp/image.bin
flashrom -p dummy:image=/tmp/image.bin,emulate=W25Q128FV \
-w /tmp/dump.bin
Change-Id: Id3d7ffcaf266a60a44eb453fd09b7c63c05349c2
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Signed-off-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/69283
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
This commit is contained in:

committed by
Felix Singer

parent
664c58f32a
commit
00635b0da2
@ -69,34 +69,6 @@ typedef int(flashrom_log_callback)(enum flashrom_log_level, const char *format,
|
||||
*/
|
||||
void flashrom_set_log_callback(flashrom_log_callback *log_callback);
|
||||
|
||||
enum flashrom_progress_stage {
|
||||
FLASHROM_PROGRESS_READ,
|
||||
FLASHROM_PROGRESS_WRITE,
|
||||
FLASHROM_PROGRESS_ERASE,
|
||||
FLASHROM_PROGRESS_NR,
|
||||
};
|
||||
struct flashrom_progress {
|
||||
enum flashrom_progress_stage stage;
|
||||
size_t current;
|
||||
size_t total;
|
||||
void *user_data;
|
||||
};
|
||||
struct flashrom_flashctx;
|
||||
typedef void(flashrom_progress_callback)(struct flashrom_flashctx *flashctx);
|
||||
/**
|
||||
* @brief Set the progress callback function.
|
||||
*
|
||||
* Set a callback function which will be invoked whenever libflashrom wants
|
||||
* to indicate the progress has changed. This allows frontends to do whatever
|
||||
* they see fit with such values, e.g. update a progress bar in a GUI tool.
|
||||
*
|
||||
* @param progress_callback Pointer to the new progress callback function.
|
||||
* @param progress_state Pointer to progress state to include with the progress
|
||||
* callback.
|
||||
*/
|
||||
void flashrom_set_progress_callback(struct flashrom_flashctx *const flashctx,
|
||||
flashrom_progress_callback *progress_callback, struct flashrom_progress *progress_state);
|
||||
|
||||
/** @} */ /* end flashrom-general */
|
||||
|
||||
/**
|
||||
@ -203,6 +175,7 @@ int flashrom_programmer_shutdown(struct flashrom_programmer *flashprog);
|
||||
* @{
|
||||
*/
|
||||
|
||||
struct flashrom_flashctx;
|
||||
/**
|
||||
* @brief Probe for a flash chip.
|
||||
*
|
||||
|
Reference in New Issue
Block a user