Re: [PATCH 1/2] fw_env: make flash_io() take buffer as an argument

Rafał Miłecki
2022-01-11T14:10:55Z

On 10.01.2022 21:19, Rafał Miłecki wrote:
> @@ -516,7 +516,7 @@ int fw_env_flush(struct env_opts *opts)
> *environment.crc = crc32(0, (uint8_t *) environment.data, ENV_SIZE);
>
> /* write environment back to flash */
> - if (flash_io(O_RDWR)) {
> + if (flash_io(O_RDWR, environment.data, ENV_SIZE)) {
> fprintf(stderr, "Error: can't write fw_env to flash\n");
> return -1;
> }

Oops, this should probably be environment.image (not .data). I'll sent V2 later.