Attention is currently required from: Nico Huber, Paul Menzel, Edward O'Callaghan, Angel Pons, Sergii Dmytruk.
2 comments:
File cli_classic.c:
" --wp-range=<start>,<len> set write protect range\n"
" --wp-region <region> set write protect region\n"
You unset it by setting an empty range (it's included in --wp-list), --wp-disable doesn't change the […]
Cool thanks! Your explanation:
"You unset it by setting an empty range (it's included in --wp-list)"
seems like a great addition to command line help! My intention is that people can answer the question "how do I unset" just by reading help, without looking into the source code.
File cli_classic.c:
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;
The structure of the API is: […]
It's good to know there is no harm, but is there any effect of doing 1,2 without 3? What would be the most common usage, 1-2-3 or 1-2?
If 1-2 is the most common usage then code is fine.
I don't suggest to ignore errors from the library, of course not. Errors should be checked in the same way, after every call. But they can be checked without printing a message. If `flashrom_wp_set_range` returns error, then just return 2 (or something else) without calling `write_wp_config`.
Just to be clear: I was thinking of a function like `mega_flashrom_wp_set_range` which does 1-2-3 and checks errors on every step.
To view, visit change 58738. To unsubscribe, or for help writing mail filters, visit settings.