Use loader devices only when they initialized properly.

This commit is contained in:
Rafal Jaworowski 2010-05-25 09:59:53 +00:00
parent 5e612d3007
commit 75770ded45
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=208534
2 changed files with 11 additions and 9 deletions

View file

@ -157,20 +157,22 @@ main(void)
panic("no U-Boot devices found");
printf("Number of U-Boot devices: %d\n", devs_no);
/*
* March through the device switch probing for things.
*/
for (i = 0; devsw[i] != NULL; i++)
if (devsw[i]->dv_init != NULL)
(devsw[i]->dv_init)();
printf("\n");
printf("%s, Revision %s\n", bootprog_name, bootprog_rev);
printf("(%s, %s)\n", bootprog_maker, bootprog_date);
meminfo();
/*
* March through the device switch probing for things.
*/
for (i = 0; devsw[i] != NULL; i++) {
printf("\nDevice %d: %s\n", i, devsw[i]->dv_name);
if (devsw[i]->dv_init == NULL)
continue;
if ((devsw[i]->dv_init)() != 0)
continue;
printf("\nDevice: %s\n", devsw[i]->dv_name);
currdev.d_dev = devsw[i];
currdev.d_type = currdev.d_dev->dv_type;

View file

@ -157,7 +157,7 @@ stor_init(void)
}
if (!found) {
printf("No storage devices\n");
debugf("No storage devices\n");
return (-1);
}