Date: Tue, 25 May 2010 09:59:53 +0000 (UTC) From: Rafal Jaworowski <raj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r208534 - in head/sys/boot/uboot: common lib Message-ID: <201005250959.o4P9xrIs085267@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201005250959.o4P9xrIs085267>