diff options
| author | Alexey Romanov <[email protected]> | 2024-07-18 08:45:23 +0300 |
|---|---|---|
| committer | Michael Trimarchi <[email protected]> | 2024-08-08 09:27:55 +0200 |
| commit | cead69c528d4f107288717aeca6af52d0d9d47e9 (patch) | |
| tree | 2fe5d8441951b5fff016ebe063edcfbbf6e7ccf3 /env | |
| parent | d12689af6c6d12f1c49d988e6c418afbbd9b82c5 (diff) | |
ubi: allow to read from volume with offset
Now user can pass an additional parameter 'offset'
to ubi_volume_read() function.
Signed-off-by: Alexey Romanov <[email protected]>
Reviewed-by: Heiko Schocher <[email protected]>
Acked-by: Heiko Schocher <[email protected]>
Signed-off-by: Michael Trimarchi <[email protected]>
Diffstat (limited to 'env')
| -rw-r--r-- | env/ubi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/env/ubi.c b/env/ubi.c index 0c3e93c2bf2..22f2cafcfbd 100644 --- a/env/ubi.c +++ b/env/ubi.c @@ -134,14 +134,14 @@ static int env_ubi_load(void) return -EIO; } - read1_fail = ubi_volume_read(CONFIG_ENV_UBI_VOLUME, (void *)tmp_env1, + read1_fail = ubi_volume_read(CONFIG_ENV_UBI_VOLUME, (void *)tmp_env1, 0, CONFIG_ENV_SIZE); if (read1_fail) printf("\n** Unable to read env from %s:%s **\n", CONFIG_ENV_UBI_PART, CONFIG_ENV_UBI_VOLUME); read2_fail = ubi_volume_read(CONFIG_ENV_UBI_VOLUME_REDUND, - (void *)tmp_env2, CONFIG_ENV_SIZE); + (void *)tmp_env2, 0, CONFIG_ENV_SIZE); if (read2_fail) printf("\n** Unable to read redundant env from %s:%s **\n", CONFIG_ENV_UBI_PART, CONFIG_ENV_UBI_VOLUME_REDUND); @@ -171,7 +171,7 @@ static int env_ubi_load(void) return -EIO; } - if (ubi_volume_read(CONFIG_ENV_UBI_VOLUME, buf, CONFIG_ENV_SIZE)) { + if (ubi_volume_read(CONFIG_ENV_UBI_VOLUME, buf, 0, CONFIG_ENV_SIZE)) { printf("\n** Unable to read env from %s:%s **\n", CONFIG_ENV_UBI_PART, CONFIG_ENV_UBI_VOLUME); env_set_default(NULL, 0); |
