mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] state: handle write-protection in the raw backend
@ 2015-07-30 15:26 Jan Luebbe
  2015-07-30 15:26 ` [PATCH 2/2] state: fix missing newline in error message Jan Luebbe
  2015-07-31  8:19 ` [PATCH 1/2] state: handle write-protection in the raw backend Sascha Hauer
  0 siblings, 2 replies; 3+ messages in thread
From: Jan Luebbe @ 2015-07-30 15:26 UTC (permalink / raw)
  To: barebox

Signed-off-by: Jan Luebbe <jluebbe@debian.org>
---
 common/state.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/common/state.c b/common/state.c
index 1243320..1ff0e24 100644
--- a/common/state.c
+++ b/common/state.c
@@ -1377,6 +1377,8 @@ static int backend_raw_save_one(struct state_backend_raw *backend_raw,
 	if (ret < 0)
 		return ret;
 
+	protect(fd, backend_raw->stride, offset, false);
+
 	if (backend_raw->need_erase) {
 		ret = erase(fd, backend_raw->stride, offset);
 		if (ret)
@@ -1387,6 +1389,8 @@ static int backend_raw_save_one(struct state_backend_raw *backend_raw,
 	if (ret < 0)
 		return ret;
 
+	protect(fd, backend_raw->stride, offset, true);
+
 	return 0;
 }
 
-- 
2.1.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-07-31  8:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-30 15:26 [PATCH 1/2] state: handle write-protection in the raw backend Jan Luebbe
2015-07-30 15:26 ` [PATCH 2/2] state: fix missing newline in error message Jan Luebbe
2015-07-31  8:19 ` [PATCH 1/2] state: handle write-protection in the raw backend Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox