Author: raj Date: Tue May 25 09:59:53 2010 New Revision: 208534 URL: http://svn.freebsd.org/changeset/base/208534
Log: Use loader devices only when they initialized properly. Modified: head/sys/boot/uboot/common/main.c head/sys/boot/uboot/lib/disk.c Modified: head/sys/boot/uboot/common/main.c ============================================================================== --- head/sys/boot/uboot/common/main.c Tue May 25 05:45:16 2010 (r208533) +++ head/sys/boot/uboot/common/main.c Tue May 25 09:59:53 2010 (r208534) @@ -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; Modified: head/sys/boot/uboot/lib/disk.c ============================================================================== --- head/sys/boot/uboot/lib/disk.c Tue May 25 05:45:16 2010 (r208533) +++ head/sys/boot/uboot/lib/disk.c Tue May 25 09:59:53 2010 (r208534) @@ -157,7 +157,7 @@ stor_init(void) } if (!found) { - printf("No storage devices\n"); + debugf("No storage devices\n"); return (-1); } _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"