As a convenience for users allow to pass the full name, including
the leading "nv.", to nvvar_add().

Signed-off-by: Sascha Hauer <s.ha...@pengutronix.de>
---
 common/globalvar.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/common/globalvar.c b/common/globalvar.c
index a2555cf..6466d1d 100644
--- a/common/globalvar.c
+++ b/common/globalvar.c
@@ -240,6 +240,9 @@ int nvvar_add(const char *name, const char *value)
 {
        int ret;
 
+       if (!strncmp(name, "nv.", 3))
+               name += 3;
+
        ret = __nvvar_add(name, value);
        if (ret)
                return ret;
-- 
2.8.1


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

Reply via email to