]> Git Repo - J-u-boot.git/blobdiff - env/ubi.c
env: ubi: Add missing ENV_NAME
[J-u-boot.git] / env / ubi.c
index d4f4901ac4b1fbfccd0ad8958582e86dbacc8e53..1dfdf0a8c8a41f768d07023d430d0eafe90acc63 100644 (file)
--- a/env/ubi.c
+++ b/env/ubi.c
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (c) Copyright 2012 by National Instruments,
  *        Joe Hershberger <[email protected]>
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -115,7 +114,7 @@ static int env_ubi_load(void)
        if (ubi_part(CONFIG_ENV_UBI_PART, NULL)) {
                printf("\n** Cannot find mtd partition \"%s\"\n",
                       CONFIG_ENV_UBI_PART);
-               set_default_env(NULL);
+               set_default_env(NULL, 0);
                return -EIO;
        }
 
@@ -152,14 +151,14 @@ static int env_ubi_load(void)
        if (ubi_part(CONFIG_ENV_UBI_PART, NULL)) {
                printf("\n** Cannot find mtd partition \"%s\"\n",
                       CONFIG_ENV_UBI_PART);
-               set_default_env(NULL);
+               set_default_env(NULL, 0);
                return -EIO;
        }
 
        if (ubi_volume_read(CONFIG_ENV_UBI_VOLUME, buf, CONFIG_ENV_SIZE)) {
                printf("\n** Unable to read env from %s:%s **\n",
                       CONFIG_ENV_UBI_PART, CONFIG_ENV_UBI_VOLUME);
-               set_default_env(NULL);
+               set_default_env(NULL, 0);
                return -EIO;
        }
 
@@ -169,6 +168,7 @@ static int env_ubi_load(void)
 
 U_BOOT_ENV_LOCATION(ubi) = {
        .location       = ENVL_UBI,
+       ENV_NAME("UBI")
        .load           = env_ubi_load,
        .save           = env_save_ptr(env_ubi_save),
 };
This page took 0.026359 seconds and 4 git commands to generate.