Browse Source

Detect sector size if not found in config

Sector size is in fw_env.config, but it could be redundant because the
value can be detected at runtime via ioctl().

Signed-off-by: Stefano Babic <sbabic@denx.de>
pull/5/head
Stefano Babic 5 years ago
parent
commit
45bf92ab6c
  1. 3
      src/uboot_env.c

3
src/uboot_env.c

@ -323,8 +323,7 @@ static int check_env_device(struct uboot_ctx *ctx, struct uboot_flash_env *dev)
return -EBADF; return -EBADF;
} }
if (dev->sectorsize == 0) { if (dev->sectorsize == 0) {
close(fd); dev->sectorsize = dev->mtdinfo.erasesize;
return -EINVAL;
} }
} }
} }

Loading…
Cancel
Save