aboutsummaryrefslogtreecommitdiff
path: root/external/pflash
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2016-09-16 15:42:34 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-09-16 15:42:34 +1000
commit0be6d5c53e89946ca12211a84a77a96b5540e9dc (patch)
tree8b5bfbf6c60ef45011470eb3353979e40ebbc47c /external/pflash
parent86640b032d79ff08b01888731e43e3187c3e92b2 (diff)
downloadskiboot-0be6d5c53e89946ca12211a84a77a96b5540e9dc.zip
skiboot-0be6d5c53e89946ca12211a84a77a96b5540e9dc.tar.gz
skiboot-0be6d5c53e89946ca12211a84a77a96b5540e9dc.tar.bz2
pflash: Don't try to write protect when writing to flash file
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@linux.vnet.ibm.com>
Diffstat (limited to 'external/pflash')
-rw-r--r--external/pflash/pflash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/external/pflash/pflash.c b/external/pflash/pflash.c
index a036a86..73eb916 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");