Attention is currently required from: Nico Huber.
Thomas Heijligen has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/64573 )
Change subject: pcidev: Always fetch ident info
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://review.coreboot.org/c/flashrom/+/64573
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Iae2511178bec44343cbe902722fdca9eda036059
Gerrit-Change-Number: 64573
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Daniel Verkamp <dverkamp(a)chromium.org>
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Comment-Date: Thu, 26 May 2022 09:50:26 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Richard Hughes.
Hello Felix Singer, build bot (Jenkins), Sean Rhodes, Edward O'Callaghan, Daniel Campello, Anastasia Klimchuk,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/64663
to look at the new patch set (#2).
Change subject: libflashrom: Allow getting the progress_state from the flashctx
......................................................................
libflashrom: Allow getting the progress_state from the flashctx
External users of the libflashrom API cannot peek into the abstract
flashrom_flashctx structure, unlike the local CLI. Provide some API to
get the flashrom_progress struct from a flashrom_flashctx.
This allows fwupd to use the new flashrom_set_progress_callback() API
without using a global variable with the callback data.
Tested with fwupd in https://github.com/fwupd/fwupd/pull/4675
Change-Id: I322bf56ff92f7b4d0ffc92768e9f0cdf7cb82010
Signed-off-by: Richard Hughes <richard(a)hughsie.com>
---
M cli_output.c
M include/libflashrom.h
M libflashrom.c
M libflashrom.map
4 files changed, 17 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/63/64663/2
--
To view, visit https://review.coreboot.org/c/flashrom/+/64663
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I322bf56ff92f7b4d0ffc92768e9f0cdf7cb82010
Gerrit-Change-Number: 64663
Gerrit-PatchSet: 2
Gerrit-Owner: Richard Hughes <richard(a)hughsie.com>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Daniel Campello <campello(a)chromium.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Sean Rhodes <sean(a)starlabs.systems>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Richard Hughes <richard(a)hughsie.com>
Gerrit-MessageType: newpatchset
Attention is currently required from: Richard Hughes.
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/64663 )
Change subject: libflashrom: Allow getting the progress_state from the flashctx
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://review.coreboot.org/c/flashrom/+/64663
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I322bf56ff92f7b4d0ffc92768e9f0cdf7cb82010
Gerrit-Change-Number: 64663
Gerrit-PatchSet: 1
Gerrit-Owner: Richard Hughes <richard(a)hughsie.com>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Daniel Campello <campello(a)chromium.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Sean Rhodes <sean(a)starlabs.systems>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Richard Hughes <richard(a)hughsie.com>
Gerrit-Comment-Date: Thu, 26 May 2022 00:12:30 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Richard Hughes, Edward O'Callaghan.
Felix Singer has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/64663 )
Change subject: libflashrom: Allow getting the progress_state from the flashctx
......................................................................
Patch Set 1: Code-Review+1
(1 comment)
File libflashrom.c:
https://review.coreboot.org/c/flashrom/+/64663/comment/72f7f379_2bf8c474
PS1, Line 69: flashrom_get_progress_state(struct flashrom_flashctx *flashctx)
Please write function header in one line as it's done elsewhere
--
To view, visit https://review.coreboot.org/c/flashrom/+/64663
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I322bf56ff92f7b4d0ffc92768e9f0cdf7cb82010
Gerrit-Change-Number: 64663
Gerrit-PatchSet: 1
Gerrit-Owner: Richard Hughes <richard(a)hughsie.com>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Daniel Campello <campello(a)chromium.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Sean Rhodes <sean(a)starlabs.systems>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Richard Hughes <richard(a)hughsie.com>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Comment-Date: Wed, 25 May 2022 23:54:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Richard Hughes, Edward O'Callaghan.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/64663 )
Change subject: libflashrom: Allow getting the progress_state from the flashctx
......................................................................
Patch Set 1: Code-Review+1
(2 comments)
Commit Message:
https://review.coreboot.org/c/flashrom/+/64663/comment/902057a8_cfdc1337
PS1, Line 9: External users of the libflashrom API
The feature is for external users, so whatever was the testing needed, it was done outside of flashrom, is my understanding correct?
If you've done any testing, you can mention in commit message, thank you!
File include/libflashrom.h:
https://review.coreboot.org/c/flashrom/+/64663/comment/7c64555c_48bfbce0
PS1, Line 110:
This looks like one superfluous line.
--
To view, visit https://review.coreboot.org/c/flashrom/+/64663
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I322bf56ff92f7b4d0ffc92768e9f0cdf7cb82010
Gerrit-Change-Number: 64663
Gerrit-PatchSet: 1
Gerrit-Owner: Richard Hughes <richard(a)hughsie.com>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Daniel Campello <campello(a)chromium.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Sean Rhodes <sean(a)starlabs.systems>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Felix Singer <felixsinger(a)posteo.net>
Gerrit-CC: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Richard Hughes <richard(a)hughsie.com>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Comment-Date: Wed, 25 May 2022 22:53:02 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Edward O'Callaghan, Nikolai Artemiev, Sergii Dmytruk.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/64375 )
Change subject: spi25_statusreg.c: Allow opaque masters to hook spi_{rw}_register()
......................................................................
Patch Set 4:
(1 comment)
File spi25_statusreg.c:
https://review.coreboot.org/c/flashrom/+/64375/comment/acf40d0c_11e57831
PS3, Line 35: }
> I thought maybe some other place overrides this statement.
No there is no other place, but the same place mentions:
> This does not apply if only one branch of a conditional statement is a single
> statement; in the latter case use braces in both branches
aaand
> Also, use braces when a loop contains more than a single simple statement
That's it, no other places :)
I also fully agree with Edward, this should be automatically detected so that humans can relax and fix some real bugs!
--
To view, visit https://review.coreboot.org/c/flashrom/+/64375
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I3ab0d7f5f48338c8ecb118a69651c203fbc516ac
Gerrit-Change-Number: 64375
Gerrit-PatchSet: 4
Gerrit-Owner: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Reviewer: Sergii Dmytruk <sergii.dmytruk(a)3mdeb.com>
Gerrit-Reviewer: Subrata Banik <subratabanik(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Attention: Sergii Dmytruk <sergii.dmytruk(a)3mdeb.com>
Gerrit-Comment-Date: Wed, 25 May 2022 22:32:33 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Edward O'Callaghan <quasisec(a)chromium.org>
Comment-In-Reply-To: Anastasia Klimchuk <aklm(a)chromium.org>
Comment-In-Reply-To: Sergii Dmytruk <sergii.dmytruk(a)3mdeb.com>
Gerrit-MessageType: comment
Attention is currently required from: Richard Hughes, Edward O'Callaghan, Anastasia Klimchuk.
Daniel Campello has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/64663 )
Change subject: libflashrom: Allow getting the progress_state from the flashctx
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://review.coreboot.org/c/flashrom/+/64663
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I322bf56ff92f7b4d0ffc92768e9f0cdf7cb82010
Gerrit-Change-Number: 64663
Gerrit-PatchSet: 1
Gerrit-Owner: Richard Hughes <richard(a)hughsie.com>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Daniel Campello <campello(a)chromium.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Sean Rhodes <sean(a)starlabs.systems>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Richard Hughes <richard(a)hughsie.com>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Comment-Date: Wed, 25 May 2022 21:28:57 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Light has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/64668 )
Change subject: cli_output.c: Format progress output to show in single line
......................................................................
cli_output.c: Format progress output to show in single line
Currently, the progress output is repeatedly printed which starts to
fill up the screen if the operation is a long one. Tidy up the progress
printing by using '\r' to overwrite previous progress
Change-Id: If982193f9857f0da47cd71706ce6cebaa60d4323
Signed-off-by: Aarya Chaumal <aarya.chaumal(a)gmail.com>
---
M cli_output.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/68/64668/1
diff --git a/cli_output.c b/cli_output.c
index e5b829a..598209f 100644
--- a/cli_output.c
+++ b/cli_output.c
@@ -85,7 +85,7 @@
((unsigned long long) progress_state->total * 100llu);
if (percentages[progress_state->stage] != pc) {
percentages[progress_state->stage] = pc;
- msg_ginfo("[%s] %u%% complete... ", flashrom_progress_stage_to_string(progress_state->stage), pc);
+ msg_ginfo("\r[%s] %u%% complete... ", flashrom_progress_stage_to_string(progress_state->stage), pc);
}
}
--
To view, visit https://review.coreboot.org/c/flashrom/+/64668
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: If982193f9857f0da47cd71706ce6cebaa60d4323
Gerrit-Change-Number: 64668
Gerrit-PatchSet: 1
Gerrit-Owner: Light <aarya.chaumal(a)gmail.com>
Gerrit-MessageType: newchange
Sean Rhodes has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/64663 )
Change subject: libflashrom: Allow getting the progress_state from the flashctx
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://review.coreboot.org/c/flashrom/+/64663
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I322bf56ff92f7b4d0ffc92768e9f0cdf7cb82010
Gerrit-Change-Number: 64663
Gerrit-PatchSet: 1
Gerrit-Owner: Richard Hughes <richard(a)hughsie.com>
Gerrit-Reviewer: Sean Rhodes <sean(a)starlabs.systems>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Wed, 25 May 2022 11:19:14 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Richard Hughes has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/64663 )
Change subject: libflashrom: Allow getting the progress_state from the flashctx
......................................................................
libflashrom: Allow getting the progress_state from the flashctx
External users of the libflashrom API cannot peek into the abstract
flashrom_flashctx structure, unlike the local CLI. Provide some API to
get the flashrom_progress struct from a flashrom_flashctx.
This allows fwupd to use the new flashrom_set_progress_callback() API
without using a global variable with the callback data.
Change-Id: I322bf56ff92f7b4d0ffc92768e9f0cdf7cb82010
Signed-off-by: Richard Hughes <richard(a)hughsie.com>
---
M cli_output.c
M include/libflashrom.h
M libflashrom.c
M libflashrom.map
4 files changed, 19 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/63/64663/1
diff --git a/cli_output.c b/cli_output.c
index e5b829a..9b7c70d 100644
--- a/cli_output.c
+++ b/cli_output.c
@@ -77,7 +77,7 @@
void flashrom_progress_cb(struct flashrom_flashctx *flashctx)
{
- struct flashrom_progress *progress_state = flashctx->progress_state;
+ struct flashrom_progress *progress_state = flashrom_get_progress_state(flashctx);
unsigned int pc = 0;
unsigned int *percentages = progress_state->user_data;
if (progress_state->current > 0 && progress_state->total > 0)
diff --git a/include/libflashrom.h b/include/libflashrom.h
index 21a5785..e6d1cf7 100644
--- a/include/libflashrom.h
+++ b/include/libflashrom.h
@@ -97,6 +97,17 @@
void flashrom_set_progress_callback(struct flashrom_flashctx *const flashctx,
flashrom_progress_callback *progress_callback, struct flashrom_progress *progress_state);
+/**
+ * @brief Get the progress state.
+ *
+ * Get the progress state set in flashrom_set_progress_callback().
+ *
+ * @param flashctx The current flash context.
+ * @return last set progress state
+ */
+struct flashrom_progress *flashrom_get_progress_state(struct flashrom_flashctx *flashctx);
+
+
/** @} */ /* end flashrom-general */
/**
diff --git a/libflashrom.c b/libflashrom.c
index 0c6613e..6499387 100644
--- a/libflashrom.c
+++ b/libflashrom.c
@@ -65,6 +65,12 @@
return 0;
}
+struct flashrom_progress *
+flashrom_get_progress_state(struct flashrom_flashctx *flashctx)
+{
+ return flashctx->progress_state;
+}
+
void flashrom_set_progress_callback(struct flashrom_flashctx *flashctx, flashrom_progress_callback *progress_callback, struct flashrom_progress *progress_state)
{
flashctx->progress_callback = progress_callback;
diff --git a/libflashrom.map b/libflashrom.map
index b3af70b..7eb2903 100644
--- a/libflashrom.map
+++ b/libflashrom.map
@@ -10,6 +10,7 @@
flashrom_flash_getsize;
flashrom_flash_probe;
flashrom_flash_release;
+ flashrom_get_progress_state;
flashrom_image_read;
flashrom_image_verify;
flashrom_image_write;
--
To view, visit https://review.coreboot.org/c/flashrom/+/64663
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I322bf56ff92f7b4d0ffc92768e9f0cdf7cb82010
Gerrit-Change-Number: 64663
Gerrit-PatchSet: 1
Gerrit-Owner: Richard Hughes <richard(a)hughsie.com>
Gerrit-MessageType: newchange