mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
Use loader devices only when they initialized properly.
This commit is contained in:
parent
5e612d3007
commit
75770ded45
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=208534
|
@ -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;
|
||||
|
|
|
@ -157,7 +157,7 @@ stor_init(void)
|
|||
}
|
||||
|
||||
if (!found) {
|
||||
printf("No storage devices\n");
|
||||
debugf("No storage devices\n");
|
||||
return (-1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue