Since we can have multiple environments now, it's better to provide a
decent indication on what environments were tried and which were the one to
fail and succeed.
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
if (!drv->load)
continue;
+ printf("Loading Environment from %s... ", drv->name);
ret = drv->load();
+ if (ret)
+ printf("Failed (%d)\n", ret);
+ else
+ printf("OK\n");
+
if (!ret)
return 0;
-
- debug("%s: Environment %s failed to load (err=%d)\n", __func__,
- drv->name, ret);
}
return -ENODEV;
printf("Saving Environment to %s... ", drv->name);
ret = drv->save();
- printf("%s\n", ret ? "Failed" : "OK");
+ if (ret)
+ printf("Failed (%d)\n", ret);
+ else
+ printf("OK\n");
+
if (!ret)
return 0;
-
- debug("%s: Environment %s failed to save (err=%d)\n", __func__,
- drv->name, ret);
}
return -ENODEV;