main: Fix loading kernel & initfs images
This commit is contained in:
1 parent
7dd8fdb560
commit
3480526cde
1 file changed
+4
-4
+4
-4
@@ -1037,9 +1037,7 @@ int main(int argc, char **argv) {
|
|||||||
|
|
||||||
/* load */
|
/* load */
|
||||||
if ( dev_load ) {
|
if ( dev_load ) {
|
||||||
ret = 0;
|
if ( image_kernel ) {
|
||||||
|
|
||||||
if ( image_kernel )
|
|
||||||
ret = dev_load_image(dev, image_kernel->image);
|
ret = dev_load_image(dev, image_kernel->image);
|
||||||
if ( ret < 0 )
|
if ( ret < 0 )
|
||||||
goto again;
|
goto again;
|
||||||
@@ -1049,8 +1047,9 @@ int main(int argc, char **argv) {
|
|||||||
image_list_unlink(image_kernel);
|
image_list_unlink(image_kernel);
|
||||||
free(image_kernel);
|
free(image_kernel);
|
||||||
image_kernel = NULL;
|
image_kernel = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if ( image_initfs )
|
if ( image_initfs ) {
|
||||||
ret = dev_load_image(dev, image_initfs->image);
|
ret = dev_load_image(dev, image_initfs->image);
|
||||||
if ( ret < 0 )
|
if ( ret < 0 )
|
||||||
goto again;
|
goto again;
|
||||||
@@ -1061,6 +1060,7 @@ int main(int argc, char **argv) {
|
|||||||
free(image_initfs);
|
free(image_initfs);
|
||||||
image_initfs = NULL;
|
image_initfs = NULL;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* flash */
|
/* flash */
|
||||||
if ( dev_flash ) {
|
if ( dev_flash ) {
|
||||||
|
|||||||
Reference in new issue
Block a user