Commit a8109dfe authored by Vladimir Khusainov's avatar Vladimir Khusainov

RM174: Make fw_setenv work faster in uClinux

parent 73dbfe00
......@@ -884,7 +884,8 @@ static int flash_write_buf (int dev, int fd, void *buf, size_t count,
#ifdef DEBUG
printf ("Write 0x%x bytes at 0x%llx\n", erasesize, blockstart);
#endif
if (write (fd, data + processed, erasesize) != erasesize) {
if (write (fd, data + processed, CONFIG_ENV_SIZE)
!= CONFIG_ENV_SIZE) {
fprintf (stderr, "Write error on %s: %s\n",
DEVNAME (dev), strerror (errno));
return -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment