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

* [PATCH 2/2] state: fix missing newline in error message
  2015-07-30 15:26 [PATCH 1/2] state: handle write-protection in the raw backend Jan Luebbe
@ 2015-07-30 15:26 ` Jan Luebbe
  2015-07-31  8:19 ` [PATCH 1/2] state: handle write-protection in the raw backend Sascha Hauer
  1 sibling, 0 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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/state.c b/common/state.c
index 1ff0e24..aa436fc 100644
--- a/common/state.c
+++ b/common/state.c
@@ -1279,7 +1279,7 @@ static int backend_raw_load_one(struct state_backend_raw *backend_raw,
 	max_len -= sizeof(header);
 	if (ret < 0) {
 		dev_err(&state->dev,
-			"cannot read header from backend device");
+			"cannot read header from backend device\n");
 		return ret;
 	}
 
-- 
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

* Re: [PATCH 1/2] state: handle write-protection in the raw backend
  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 ` Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2015-07-31  8:19 UTC (permalink / raw)
  To: Jan Luebbe; +Cc: barebox

On Thu, Jul 30, 2015 at 05:26:22PM +0200, Jan Luebbe wrote:
> Signed-off-by: Jan Luebbe <jluebbe@debian.org>
> ---
>  common/state.c | 4 ++++
>  1 file changed, 4 insertions(+)

Applied, thanks

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
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