Attention is currently required from: Nico Huber, Paul Menzel, Edward O'Callaghan, Angel Pons, Nikolai Artemiev, Sergii Dmytruk.
4 comments:
Patchset:
It would be really great if other people have a look, re: API discussion started in CB:58482 thank you!
File cli_classic.c:
" --wp-range=<start>,<len> set write protect range\n"
" --wp-region <region> set write protect region\n"
I am just wondering, there are commands to set wp range/region, but how to unset? Or is it --wp-disable command to unset everything that has been set previously?
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;
Continuing the conversation about libflashrom vs cli. If we have a a command "set wp range", from this code it looks like it needs two operations, flashrom_wp_set_range and write_wp_config , to be performed in order? Does it mean libflashrom users would have to remember to perform two operations, in order? What happens if you do flashrom_wp_set_range but forget to do write_wp_config? range won't be set properly I assume?
I think flashrom_wp_set_range should include write_wp_config, so that just calling flashrom_wp_set_range is sufficient to perform a command.
I understand we need to print extra messages here. To achieve that, flashrom_wp_set_range need to return error codes, can be 1,2,3 etc. Here, we can print messages depending on error code.
ret = flashrom_wp_set_mode(&cfg, mode);
if (ret) {
msg_gerr("The chip does not support the requested mode.\n");
return ret;
}
/* Write mode before other operations */
ret = write_wp_config(flash, &cfg);
if (ret)
return ret;
Same comment, seems like an operation consists of two steps.
To view, visit change 58738. To unsubscribe, or for help writing mail filters, visit settings.