X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=env%2Fenv.c;h=2e64346438e884bdd9996b69f6664843aa35afd9;hb=117c7ee283f1c3f49306fb11939b59fe11cbf5a8;hp=d3cbe2f9158429c95c095c9bed6564d9285702ef;hpb=62a09f45ab824c5fdebf0217c774bededf223232;p=platform%2Fkernel%2Fu-boot.git diff --git a/env/env.c b/env/env.c index d3cbe2f..2e64346 100644 --- a/env/env.c +++ b/env/env.c @@ -5,7 +5,11 @@ */ #include -#include +#include +#include +#include +#include +#include DECLARE_GLOBAL_DATA_PTR; @@ -99,7 +103,7 @@ static void env_set_inited(enum env_location location) * using the above enum value as the bit index. We need to * make sure that we're not overflowing it. */ - BUILD_BUG_ON(ARRAY_SIZE(env_locations) > BITS_PER_LONG); + BUILD_BUG_ON(ENVL_COUNT > BITS_PER_LONG); gd->env_has_init |= BIT(location); } @@ -236,13 +240,17 @@ int env_save(void) if (drv) { int ret; - if (!drv->save) + printf("Saving Environment to %s... ", drv->name); + if (!drv->save) { + printf("not possible\n"); return -ENODEV; + } - if (!env_has_inited(drv->location)) + if (!env_has_inited(drv->location)) { + printf("not initialized\n"); return -ENODEV; + } - printf("Saving Environment to %s... ", drv->name); ret = drv->save(); if (ret) printf("Failed (%d)\n", ret);