[Skiboot] [PATCH] pflash: Don't try to write protect when writing to flash file
Stewart Smith
stewart at linux.vnet.ibm.com
Fri Sep 16 15:44:15 AEST 2016
When we're using a file on the filesystem as the flash device,
we don't need to write protect it when we flash.
Signed-off-by: Stewart Smith <stewart at linux.vnet.ibm.com>
---
external/pflash/pflash.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/external/pflash/pflash.c b/external/pflash/pflash.c
index a036a86c8aba..73eb916cb37b 100644
--- a/external/pflash/pflash.c
+++ b/external/pflash/pflash.c
@@ -878,7 +878,7 @@ int main(int argc, char *argv[])
}
/* Unlock flash (PNOR only) */
- if ((erase || program || do_clear) && !bmc_flash) {
+ if ((erase || program || do_clear) && !bmc_flash && !flashfilename) {
need_relock = arch_flash_set_wrprotect(bl, false);
if (need_relock == -1) {
fprintf(stderr, "Architecture doesn't support write protection on flash\n");
--
2.1.4
More information about the Skiboot
mailing list