Nico Huber has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/31012
Change subject: cli_classic: Report the gathered layout entries at level dbg ......................................................................
cli_classic: Report the gathered layout entries at level dbg
Change-Id: I7678ba5138f0d722ee44747fe123f192abdd0ffd Signed-off-by: Nico Huber nico.h@gmx.de --- M cli_classic.c M layout.c M layout.h 3 files changed, 18 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/12/31012/1
diff --git a/cli_classic.c b/cli_classic.c index ced08c6..536ef24 100644 --- a/cli_classic.c +++ b/cli_classic.c @@ -645,6 +645,8 @@ goto out_shutdown; }
+ report_layout(layout); + flashrom_layout_set(fill_flash, layout); flashrom_flag_set(fill_flash, FLASHROM_FLAG_FORCE, !!force); #if CONFIG_INTERNAL == 1 diff --git a/layout.c b/layout.c index fa66238..c589d17 100644 --- a/layout.c +++ b/layout.c @@ -229,3 +229,17 @@
return ret; } + +void report_layout(const struct flashrom_layout *const l) +{ + unsigned int i; + + if (!l) + return; + + msg_gdbg("Gathered %zu layout entries:\n", l->num_entries); + for (i = 0; i < l->num_entries; ++i) { + msg_gdbg("%08"PRIx32":%08"PRIx32" %s\n", + l->entries[i].start, l->entries[i].end, l->entries[i].name); + } +} diff --git a/layout.h b/layout.h index eb54a4f..61311bc 100644 --- a/layout.h +++ b/layout.h @@ -59,4 +59,6 @@
int process_include_args(struct flashrom_layout *);
+void report_layout(const struct flashrom_layout *); + #endif /* !__LAYOUT_H__ */
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/31012 )
Change subject: cli_classic: Report the gathered layout entries at level dbg ......................................................................
Patch Set 1: Code-Review+1
David Hendricks has uploaded a new patch set (#2) to the change originally created by Nico Huber. ( https://review.coreboot.org/c/flashrom/+/31012 )
Change subject: cli_classic: Report the gathered layout entries at level dbg ......................................................................
cli_classic: Report the gathered layout entries at level dbg
Change-Id: I7678ba5138f0d722ee44747fe123f192abdd0ffd Signed-off-by: Nico Huber nico.h@gmx.de --- M cli_classic.c M layout.c M layout.h 3 files changed, 17 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/12/31012/2
David Hendricks has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/31012 )
Change subject: cli_classic: Report the gathered layout entries at level dbg ......................................................................
Patch Set 2: Code-Review+2
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/31012 )
Change subject: cli_classic: Report the gathered layout entries at level dbg ......................................................................
Patch Set 2: Code-Review+2
Attention is currently required from: Nico Huber, David Hendricks. Thomas Heijligen has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/31012 )
Change subject: cli_classic: Report the gathered layout entries at level dbg ......................................................................
Patch Set 2: Code-Review+2
Attention is currently required from: Nico Huber, David Hendricks. Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/31012 )
Change subject: cli_classic: Report the gathered layout entries at level dbg ......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS2: Is anything happening with this?
Attention is currently required from: David Hendricks. Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/31012 )
Change subject: cli_classic: Report the gathered layout entries at level dbg ......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS2:
Is anything happening with this?
Looks like it needs a proper, manual rebase. I wouldn't mind if somebody wants to take it over.
Attention is currently required from: David Hendricks.
Angel Pons has uploaded a new patch set (#3) to the change originally created by Nico Huber. ( https://review.coreboot.org/c/flashrom/+/31012 )
Change subject: cli_classic: Report the gathered layout entries at level dbg ......................................................................
cli_classic: Report the gathered layout entries at level dbg
Change-Id: I7678ba5138f0d722ee44747fe123f192abdd0ffd Signed-off-by: Nico Huber nico.h@gmx.de --- M cli_classic.c M include/layout.h M layout.c 3 files changed, 28 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/12/31012/3
Attention is currently required from: Nico Huber, David Hendricks, Edward O'Callaghan.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/31012 )
Change subject: cli_classic: Report the gathered layout entries at level dbg ......................................................................
Patch Set 3:
(1 comment)
Patchset:
PS2:
Looks like it needs a proper, manual rebase. I wouldn't mind if somebody wants […]
Done
Attention is currently required from: Nico Huber, David Hendricks, Angel Pons.
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/31012 )
Change subject: cli_classic: Report the gathered layout entries at level dbg ......................................................................
Patch Set 3: Code-Review+1
(1 comment)
Patchset:
PS3: Looks like the buildbot is unhappy but +1 for the general patch for while its fixed up +2.
Attention is currently required from: Nico Huber, David Hendricks, Angel Pons.
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/31012 )
Change subject: cli_classic: Report the gathered layout entries at level dbg ......................................................................
Patch Set 3:
(1 comment)
File layout.c:
https://review.coreboot.org/c/flashrom/+/31012/comment/9f98a1cb_5c6f13f8 PS3, Line 436: l->num_entries I guess this would become `i`. Perhaps then:
`msg_gdbg("Found %zu layout entries.\n", i);` after the for-loop.
Attention is currently required from: Nico Huber, David Hendricks, Edward O'Callaghan.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/31012 )
Change subject: cli_classic: Report the gathered layout entries at level dbg ......................................................................
Patch Set 3:
(1 comment)
File layout.c:
https://review.coreboot.org/c/flashrom/+/31012/comment/ccdde6b5_3aa9fbbf PS3, Line 436: l->num_entries
I guess this would become `i`. Perhaps then: […]
Wouldn't that look weird, though? It would print the layout entries themselves, and then say what they are.
Attention is currently required from: Nico Huber, David Hendricks, Edward O'Callaghan.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/31012 )
Change subject: cli_classic: Report the gathered layout entries at level dbg ......................................................................
Patch Set 3:
(1 comment)
File layout.c:
https://review.coreboot.org/c/flashrom/+/31012/comment/379afbc1_8cb0eff3 PS3, Line 436: l->num_entries
Wouldn't that look weird, though? It would print the layout entries themselves, and then say what th […]
Hmmm, the structure is now a linked list. We'll have to do it your way, then.
Attention is currently required from: Nico Huber, David Hendricks, Edward O'Callaghan, Angel Pons.
Angel Pons has uploaded a new patch set (#4) to the change originally created by Nico Huber. ( https://review.coreboot.org/c/flashrom/+/31012 )
Change subject: cli_classic: Report the gathered layout entries at level dbg ......................................................................
cli_classic: Report the gathered layout entries at level dbg
Change-Id: I7678ba5138f0d722ee44747fe123f192abdd0ffd Signed-off-by: Nico Huber nico.h@gmx.de Signed-off-by: Angel Pons th3fanbus@gmail.com --- M cli_classic.c M include/layout.h M layout.c 3 files changed, 30 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/12/31012/4
Attention is currently required from: Nico Huber, David Hendricks, Edward O'Callaghan.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/31012 )
Change subject: cli_classic: Report the gathered layout entries at level dbg ......................................................................
Patch Set 4:
(1 comment)
File layout.c:
https://review.coreboot.org/c/flashrom/+/31012/comment/d4b3e0e6_e1e0ddac PS3, Line 436: l->num_entries
Hmmm, the structure is now a linked list. We'll have to do it your way, then.
Done, thoughts?
Attention is currently required from: David Hendricks, Edward O'Callaghan, Angel Pons.
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/31012 )
Change subject: cli_classic: Report the gathered layout entries at level dbg ......................................................................
Patch Set 4:
(3 comments)
File layout.c:
https://review.coreboot.org/c/flashrom/+/31012/comment/046e0185_3cd78f5c PS3, Line 436: l->num_entries
Done, thoughts?
I probably only put the number there because it was part of the struct. The important part was to have some feedback about possible arguments to `-i`.
Doesn't hurt to print it anyway, though ;)
File layout.c:
https://review.coreboot.org/c/flashrom/+/31012/comment/e27b495b_e31cc780 PS4, Line 436: for (struct romentry *entry = l->head; entry; entry = entry->next) { Please use `layout_next()`.
https://review.coreboot.org/c/flashrom/+/31012/comment/4a9a29ee_835d73f4 PS4, Line 441: msg_gdbg("Total %u entries\n", i); It feels like we might want a period at the end. I know it's not a complete sentence anyway.
Attention is currently required from: David Hendricks, Edward O'Callaghan, Angel Pons.
Angel Pons has uploaded a new patch set (#5) to the change originally created by Nico Huber. ( https://review.coreboot.org/c/flashrom/+/31012 )
Change subject: cli_classic: Report the gathered layout entries at level dbg ......................................................................
cli_classic: Report the gathered layout entries at level dbg
Change-Id: I7678ba5138f0d722ee44747fe123f192abdd0ffd Signed-off-by: Nico Huber nico.h@gmx.de Signed-off-by: Angel Pons th3fanbus@gmail.com --- M cli_classic.c M include/layout.h M layout.c 3 files changed, 32 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/12/31012/5
Attention is currently required from: Nico Huber, David Hendricks, Edward O'Callaghan.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/31012 )
Change subject: cli_classic: Report the gathered layout entries at level dbg ......................................................................
Patch Set 5:
(2 comments)
File layout.c:
https://review.coreboot.org/c/flashrom/+/31012/comment/c178a289_5a24c195 PS4, Line 436: for (struct romentry *entry = l->head; entry; entry = entry->next) {
Please use `layout_next()`.
Kindly borrowed the while-loop from some other function. This also makes the data pointed by `entry` const.
https://review.coreboot.org/c/flashrom/+/31012/comment/780ce972_8a5932fd PS4, Line 441: msg_gdbg("Total %u entries\n", i);
It feels like we might want a period at the end. I know it's not a complete […]
Added a period and replaced "Total" with "Got"
Attention is currently required from: Nico Huber, David Hendricks, Angel Pons.
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/31012 )
Change subject: cli_classic: Report the gathered layout entries at level dbg ......................................................................
Patch Set 5: Code-Review+2