env: Drop the env_name_spec global
Add a name to the driver and use that instead of the global variable
declared by each driver.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
diff --git a/cmd/nvedit.c b/cmd/nvedit.c
index cd17db6..75df997 100644
--- a/cmd/nvedit.c
+++ b/cmd/nvedit.c
@@ -706,7 +706,9 @@
static int do_env_save(cmd_tbl_t *cmdtp, int flag, int argc,
char * const argv[])
{
- printf("Saving Environment to %s...\n", env_name_spec);
+ struct env_driver *env = env_driver_lookup_default();
+
+ printf("Saving Environment to %s...\n", env->name);
return saveenv() ? 1 : 0;
}