sys/config: Add "config delete" CLI command
Add a "config delete" subcommand, e.g.
config delete id/serial
Note: config groups must implement correct delete behavior (do the right
thing when a value is set to "").
@@ -117,8 +117,10 @@ shell_conf_command(int argc, char **argv)
}
console_printf("%s", val);
return 0;
- } else {
- if (!strcmp(name, "dump")) {
+ } else if (!strcmp(name, "delete")) {
+ name = val;
+ val = "";
+ } else if (!strcmp(name, "dump")) {
if (!val || !strcmp(val, "running")) {
conf_dump_running();
}
@@ -134,7 +136,6 @@ shell_conf_command(int argc, char **argv)
return 0;
}
}
- }
if (!val) {
val = conf_get_value(name, tmp_buf, sizeof(tmp_buf));
if (!val) {
