MLK-14828 env_sata: Fix SATA saveenv issue
authorYe Li <ye.li@nxp.com>
Mon, 8 May 2017 09:32:02 +0000 (04:32 -0500)
committerYe Li <ye.li@nxp.com>
Mon, 8 May 2017 09:45:34 +0000 (04:45 -0500)
Wrong env buffer was passed into sata write function, so the saveenv can't work.
Fix this issue.

Signed-off-by: Ye Li <ye.li@nxp.com>
common/env_sata.c

index b0cee35..ed90724 100644 (file)
@@ -79,7 +79,7 @@ int saveenv(void)
                return 1;
 
        printf("Writing to SATA(%d)...", env_sata);
-       if (write_env(sata, CONFIG_ENV_SIZE, CONFIG_ENV_OFFSET, &env_new)) {
+       if (write_env(sata, CONFIG_ENV_SIZE, CONFIG_ENV_OFFSET, (u_char *)env_new)) {
                puts("failed\n");
                return 1;
        }