summaryrefslogtreecommitdiffstats
path: root/commands/nv.c
diff options
context:
space:
mode:
Diffstat (limited to 'commands/nv.c')
-rw-r--r--commands/nv.c30
1 files changed, 7 insertions, 23 deletions
diff --git a/commands/nv.c b/commands/nv.c
index 315019345c..c60bb41677 100644
--- a/commands/nv.c
+++ b/commands/nv.c
@@ -1,21 +1,8 @@
-/*
- * nv.c - non volatile shell variables
- *
- * Copyright (c) 2014 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
+// SPDX-License-Identifier: GPL-2.0-only
+// SPDX-FileCopyrightText: © 2014 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
+
+/* nv.c - non volatile shell variables */
+
#include <common.h>
#include <malloc.h>
#include <command.h>
@@ -68,11 +55,8 @@ static int do_nv(int argc, char *argv[])
for (i = 0; i < argc; i++) {
int ret;
- value = strchr(argv[0], '=');
- if (value) {
- *value = 0;
- value++;
- }
+
+ value = parse_assignment(argv[i]) ?: "";
if (do_remove) {
ret = nvvar_remove(argv[i]);