[PATCH 1/2] nv: Allow full variable name in nvvar_add

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux