X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=env%2Fsata.c;h=8bfcc94306d3a2a8b12ba9f18379d901e0ce7628;hb=023329284dadbbe7e0ed40bcda8101653997e507;hp=c3e530eb314f218eecc70e3cbed83db6c126d296;hpb=abeb9d7897510533ce3a0a9515cac16db5bed834;p=oweals%2Fu-boot.git diff --git a/env/sata.c b/env/sata.c index c3e530eb31..8bfcc94306 100644 --- a/env/sata.c +++ b/env/sata.c @@ -1,7 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * (C) Copyright 2010-2016 Freescale Semiconductor, Inc. - * - * SPDX-License-Identifier: GPL-2.0+ */ /* #define DEBUG */ @@ -9,14 +8,15 @@ #include #include -#include +#include +#include #include #include #include #include #include -#if defined(CONFIG_ENV_SIZE_REDUND) || defined(CONFIG_ENV_OFFSET_REDUND) +#if defined(CONFIG_ENV_OFFSET_REDUND) #error ENV REDUND not supported #endif @@ -66,7 +66,7 @@ static int env_sata_save(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; } @@ -107,7 +107,7 @@ static void env_sata_load(void) } if (read_env(sata, CONFIG_ENV_SIZE, CONFIG_ENV_OFFSET, buf)) { - set_default_env(NULL); + env_set_default(NULL, 0); return -EIO; }