Anastasia Klimchuk has submitted this change. ( https://review.coreboot.org/c/flashrom/+/87180?usp=email )
Change subject: libflashrom: Set maximum log level SPEW by default
......................................................................
libflashrom: Set maximum log level SPEW by default
This log level is the maximum level that will trigger the log
callback. By default log callback should be triggered for all
messages, and then client can decide whether they want to lower
the level.
This also keeps the same behaviour for existing clients of
libflashrom, the same as it was before introducing the ability
to set max log level in log callback API.
Follow up on
commit 4e334c4f79da2b621917da8f47dcf33bb2c0cfbc
Change-Id: Id063c31e685c930b9f5632c7b86ffac6fe477fd5
Signed-off-by: Anastasia Klimchuk <aklm(a)flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/87180
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Dmitry Zhadinets <dzhadinets(a)gmail.com>
Reviewed-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
---
M libflashrom.c
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Dmitry Zhadinets: Looks good to me, but someone else must approve
build bot (Jenkins): Verified
Stefan Reinauer: Looks good to me, approved
diff --git a/libflashrom.c b/libflashrom.c
index a9aff50..888ca05 100644
--- a/libflashrom.c
+++ b/libflashrom.c
@@ -34,7 +34,7 @@
static flashrom_log_callback *global_log_callback = NULL;
static flashrom_log_callback_v2 *global_log_callback_v2 = NULL;
static void *global_log_user_data = NULL;
-static enum flashrom_log_level global_log_level = FLASHROM_MSG_INFO;
+static enum flashrom_log_level global_log_level = FLASHROM_MSG_SPEW;
int flashrom_init(const int perform_selfcheck)
{
--
To view, visit https://review.coreboot.org/c/flashrom/+/87180?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: Id063c31e685c930b9f5632c7b86ffac6fe477fd5
Gerrit-Change-Number: 87180
Gerrit-PatchSet: 2
Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Dmitry Zhadinets <dzhadinets(a)gmail.com>
Gerrit-Reviewer: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Attention is currently required from: Dmitry Zhadinets, Peter Marheine.
Anastasia Klimchuk has posted comments on this change by Anastasia Klimchuk. ( https://review.coreboot.org/c/flashrom/+/87180?usp=email )
Change subject: libflashrom: Set maximum log level SPEW by default
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
> Will you merge the previous commit where you set it for cli only ?
yes, I merged, sorry I had no time to respond yesterday
--
To view, visit https://review.coreboot.org/c/flashrom/+/87180?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: Id063c31e685c930b9f5632c7b86ffac6fe477fd5
Gerrit-Change-Number: 87180
Gerrit-PatchSet: 1
Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Dmitry Zhadinets <dzhadinets(a)gmail.com>
Gerrit-Reviewer: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Dmitry Zhadinets <dzhadinets(a)gmail.com>
Gerrit-Attention: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Comment-Date: Sun, 06 Apr 2025 22:52:39 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Dmitry Zhadinets <dzhadinets(a)gmail.com>
Anastasia Klimchuk has submitted this change. ( https://review.coreboot.org/c/flashrom/+/87174?usp=email )
Change subject: cli: Set maximum log level for log callback
......................................................................
cli: Set maximum log level for log callback
Follow up (or fix) on
commit 6571f263b52710579f27b3c53ade52d46acbc8e3
which adds ability to set maximum log level to log callback API.
And INFO as the default.
Without this patch cli options -V, -VV, -VVV not working anymore.
cli at the moment processes all the messages in the callback,
so log level should be maximum possible to get all the messages.
Alternative to this could be setting the default max log level
for callback as SPEW.
Tested by running with -V, -VV, -VVV
flashrom -p dummy:emulate=W25Q128FV,freq=64mhz -r dump.rom --progress
Change-Id: I70a02ea1a1d692267fd6d92cdb5273786a913777
Signed-off-by: Anastasia Klimchuk <aklm(a)flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/87174
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Dmitry Zhadinets <dzhadinets(a)gmail.com>
Reviewed-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
---
M cli_classic.c
1 file changed, 3 insertions(+), 0 deletions(-)
Approvals:
Stefan Reinauer: Looks good to me, approved
build bot (Jenkins): Verified
Dmitry Zhadinets: Looks good to me, but someone else must approve
diff --git a/cli_classic.c b/cli_classic.c
index d0c7114..3e5dab9 100644
--- a/cli_classic.c
+++ b/cli_classic.c
@@ -1110,6 +1110,9 @@
* chip when a flash device gets opened with fd 1 or 2.
*/
if (check_file(stdout) && check_file(stderr)) {
+ /* This is maximum log level for callback to be invoked,
+ * and cli wants callback to be always invoked. */
+ flashrom_set_log_level(FLASHROM_MSG_SPEW);
flashrom_set_log_callback(&flashrom_print_cb);
}
--
To view, visit https://review.coreboot.org/c/flashrom/+/87174?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: I70a02ea1a1d692267fd6d92cdb5273786a913777
Gerrit-Change-Number: 87174
Gerrit-PatchSet: 3
Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Dmitry Zhadinets <dzhadinets(a)gmail.com>
Gerrit-Reviewer: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Attention is currently required from: Anastasia Klimchuk, Peter Marheine.
Stefan Reinauer has posted comments on this change by Anastasia Klimchuk. ( https://review.coreboot.org/c/flashrom/+/87180?usp=email )
Change subject: libflashrom: Set maximum log level SPEW by default
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://review.coreboot.org/c/flashrom/+/87180?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: Id063c31e685c930b9f5632c7b86ffac6fe477fd5
Gerrit-Change-Number: 87180
Gerrit-PatchSet: 1
Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Dmitry Zhadinets <dzhadinets(a)gmail.com>
Gerrit-Reviewer: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Attention: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Comment-Date: Sat, 05 Apr 2025 16:53:13 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: Anastasia Klimchuk, Peter Marheine, Stefan Reinauer.
Dmitry Zhadinets has posted comments on this change by Anastasia Klimchuk. ( https://review.coreboot.org/c/flashrom/+/87180?usp=email )
Change subject: libflashrom: Set maximum log level SPEW by default
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://review.coreboot.org/c/flashrom/+/87180?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: Id063c31e685c930b9f5632c7b86ffac6fe477fd5
Gerrit-Change-Number: 87180
Gerrit-PatchSet: 1
Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Dmitry Zhadinets <dzhadinets(a)gmail.com>
Gerrit-Reviewer: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Attention: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Comment-Date: Sat, 05 Apr 2025 15:55:01 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: Anastasia Klimchuk, Peter Marheine, Stefan Reinauer.
Dmitry Zhadinets has posted comments on this change by Anastasia Klimchuk. ( https://review.coreboot.org/c/flashrom/+/87180?usp=email )
Change subject: libflashrom: Set maximum log level SPEW by default
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
Will you merge the previous commit where you set it for cli only ?
--
To view, visit https://review.coreboot.org/c/flashrom/+/87180?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: Id063c31e685c930b9f5632c7b86ffac6fe477fd5
Gerrit-Change-Number: 87180
Gerrit-PatchSet: 1
Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Dmitry Zhadinets <dzhadinets(a)gmail.com>
Gerrit-Reviewer: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Attention: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Comment-Date: Sat, 05 Apr 2025 15:54:45 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Attention is currently required from: Anastasia Klimchuk, Peter Marheine.
Dmitry Zhadinets has posted comments on this change by Dmitry Zhadinets. ( https://review.coreboot.org/c/flashrom/+/86921?usp=email )
Change subject: libflashrom: Add API to enumerate supported programmers
......................................................................
Patch Set 11:
(4 comments)
Patchset:
PS1:
> But this is a good idea: `list_programmers_linebreak` iterates through programmers names, which is e […]
One moment please, ```list_programmers_linebreak``` has a different meaning. It does not prepare the list for external usage, it prints the list to the logger only, assuming line breaks/startcol/cols/paren. But I need just an array of strings and this is a simple loop through. It is not heavy in order to reuse something.
Iterator has its meaning from this comment https://review.coreboot.org/c/flashrom/+/86921/comment/305f6656_3d9d7212/
The issue is that I had to allocate the memory and Peter wanted to prevent it but we already use an allocation in all other get_supported.. functions. Therefore we decided to leave this implementation plus to implement fn like this in next commit
```
const char *flashrom_get_programmer_name(int n)
{
if (n < 0 || (size_t)n >= programmer_table_size)
return NULL;
return programmer_table[n]->name;
}
```
I probably confused you with the deleting of commits. It is my fault. My git for some reason squashes commit when I set to edit it. But lets discuss only what we have here please.
Commit Message:
https://review.coreboot.org/c/flashrom/+/86921/comment/8df972b1_2c57a8d8?us… :
PS10, Line 7: libflashrom: Added API to enumerate supported programmers
> This title we changed earlier as […]
Done
File libflashrom.c:
https://review.coreboot.org/c/flashrom/+/86921/comment/86eadc86_712540a1?us… :
PS10, Line 199:
> no space here
Done
File tests/libflashrom.c:
https://review.coreboot.org/c/flashrom/+/86921/comment/3f22ee95_fdf0c6a4?us… :
PS10, Line 109: while (*(ptr++)) {}
> Maybe you can assert inside the loop that programmer name is not empty string (unless it's the last […]
Done
--
To view, visit https://review.coreboot.org/c/flashrom/+/86921?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: Ib5275b742b849183b1fe701900040fee369a1d78
Gerrit-Change-Number: 86921
Gerrit-PatchSet: 11
Gerrit-Owner: Dmitry Zhadinets <dzhadinets(a)gmail.com>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Attention: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Comment-Date: Sat, 05 Apr 2025 15:37:45 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Dmitry Zhadinets <dzhadinets(a)gmail.com>
Comment-In-Reply-To: Anastasia Klimchuk <aklm(a)chromium.org>
Comment-In-Reply-To: Peter Marheine <pmarheine(a)chromium.org>
Attention is currently required from: Dmitry Zhadinets.
Hello Anastasia Klimchuk, Peter Marheine, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/86921?usp=email
to look at the new patch set (#11).
The following approvals got outdated and were removed:
Verified+1 by build bot (Jenkins)
Change subject: libflashrom: Add API to enumerate supported programmers
......................................................................
libflashrom: Add API to enumerate supported programmers
There were no options available to obtain the list of programmers.
The implementation is based on flashrom_supported_flash_chips.
Arrays of constant strings are returned, and the array must be
freed using flashrom_data_free.
Testing: Both unit tests and CLI tools serve as libflashrom clients.
All unit tests run successfully.
Change-Id: Ib5275b742b849183b1fe701900040fee369a1d78
Signed-off-by: Dmitry Zhadinets <dzhadinets(a)gmail.com>
---
M include/libflashrom.h
M libflashrom.c
M libflashrom.map
M tests/libflashrom.c
M tests/tests.c
M tests/tests.h
6 files changed, 42 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/21/86921/11
--
To view, visit https://review.coreboot.org/c/flashrom/+/86921?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: Ib5275b742b849183b1fe701900040fee369a1d78
Gerrit-Change-Number: 86921
Gerrit-PatchSet: 11
Gerrit-Owner: Dmitry Zhadinets <dzhadinets(a)gmail.com>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Dmitry Zhadinets <dzhadinets(a)gmail.com>
Attention is currently required from: Stefan Reinauer.
Anastasia Klimchuk has posted comments on this change by Anastasia Klimchuk. ( https://review.coreboot.org/c/flashrom/+/86953?usp=email )
Change subject: doc: Update supported flashchips page because we split the large file
......................................................................
Patch Set 3:
(2 comments)
File doc/supported_hw/supported_flashchips.rst:
https://review.coreboot.org/c/flashrom/+/86953/comment/d4089529_385df7fe?us… :
PS2, Line 5: is in
> is in the
Done
https://review.coreboot.org/c/flashrom/+/86953/comment/e1cdb66b_a0a6d764?us… :
PS2, Line 10: in ``/flashchips`` directory
> All the files in the ``/flashchips`` directory are included in the parent file ``flashchips.c``. […]
Done
--
To view, visit https://review.coreboot.org/c/flashrom/+/86953?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: Ic6179517d0f951a32c0c4e0baf32677398224542
Gerrit-Change-Number: 86953
Gerrit-PatchSet: 3
Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Comment-Date: Sat, 05 Apr 2025 12:28:15 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Stefan Reinauer <stefan.reinauer(a)coreboot.org>