diff options
author | Pali Rohár <pali.rohar@gmail.com> | 2021-05-01 20:10:21 +0200 |
---|---|---|
committer | Pali Rohár <pali.rohar@gmail.com> | 2021-05-01 20:10:21 +0200 |
commit | 670db0d169672f5719663a2fc88e5aed39eb3f4f (patch) | |
tree | feb8fecf15ef1a7593e8c7f15df52d4ce5b168f0 | |
parent | 6eb58dcccb308a7bde71e9038a3e59a10da6f94c (diff) | |
download | 0xFFFF-670db0d169672f5719663a2fc88e5aed39eb3f4f.tar.bz2 |
main: Retry load and flash operations only on -EAGAIN error
-rw-r--r-- | src/main.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1096,7 +1096,7 @@ int main(int argc, char **argv) { if ( dev_load ) { if ( image_kernel ) { ret = dev_load_image(dev, image_kernel->image); - if ( ret < 0 ) + if ( ret == -EAGAIN ) goto again; if ( image_kernel == image_first ) @@ -1110,7 +1110,7 @@ int main(int argc, char **argv) { if ( image_initfs ) { ret = dev_load_image(dev, image_initfs->image); - if ( ret < 0 ) + if ( ret == -EAGAIN ) goto again; if ( image_initfs == image_first ) @@ -1129,7 +1129,7 @@ int main(int argc, char **argv) { while ( image_ptr ) { struct image_list * next = image_ptr->next; ret = dev_flash_image(dev, image_ptr->image); - if ( ret < 0 ) + if ( ret == -EAGAIN ) goto again; if ( image_ptr == image_first ) |