Attention is currently required from: Nico Huber, Paul Menzel, Edward O'Callaghan, Angel Pons, Anastasia Klimchuk, Sergii Dmytruk. Nikolai Artemiev has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/58738 )
Change subject: cli_classic: add writeprotect CLI ......................................................................
Patch Set 18:
(1 comment)
File cli_classic.c:
https://review.coreboot.org/c/flashrom/+/58738/comment/05a65f48_b37e9f3a PS17, Line 220: ret = flashrom_wp_set_range(flash, &cfg, &range); : if (ret) { : msg_gerr("The chip does not support the requested range.\n"); : return ret; : } : : /* Write range before other operations (i.e. enabling HW protection) */ : ret = write_wp_config(flash, &cfg); : if (ret) : return ret;
It's good to know there is no harm, but is there any effect of doing 1,2 without 3? What would be […]
We could print messages from libflashrom, but it's generally undesirable and should be removed as much as possible IMO. It indicates that something is important enough that a CLI user should know about it, without providing any way for API callers to know about it (unless they intercept and parse stdout).
There are also some potential cases where we want to do operations 1/2 but not 3: - A dry run mode that just prints the config that to be written instead of writing it. - Chip-specific tests that check the config bits being set by the set_range and set_mode. We might be able to use dummyflasher for this but testing the API directly would also be useful.