+ return 0;
+}
+
+int env_import_redund(const char *buf1, int buf1_read_fail,
+ const char *buf2, int buf2_read_fail,
+ int flags)
+{
+ env_t *ep;
+ int ret;
+
+ ret = env_check_redund(buf1, buf1_read_fail, buf2, buf2_read_fail);
+
+ if (ret == -EIO) {
+ env_set_default("bad env area", 0);
+ return -EIO;
+ } else if (ret == -EINVAL) {
+ return env_import((char *)buf1, 1, flags);
+ } else if (ret == -ENOENT) {
+ return env_import((char *)buf2, 1, flags);
+ } else if (ret == -ENOMSG) {
+ env_set_default("bad CRC", 0);
+ return -ENOMSG;
+ }
+