svn commit: r335869 - head/stand/uboot/common

Emmanuel Vadot manu at FreeBSD.org
Mon Jul 2 18:23:45 UTC 2018


Author: manu
Date: Mon Jul  2 18:23:43 2018
New Revision: 335869
URL: https://svnweb.freebsd.org/changeset/base/335869

Log:
  stand: uboot: Do not panic if we can't find a boot device
  
  It is really anoying to panic when there is no boot device as you
  cannot see the availables ones.

Modified:
  head/stand/uboot/common/main.c

Modified: head/stand/uboot/common/main.c
==============================================================================
--- head/stand/uboot/common/main.c	Mon Jul  2 18:19:08 2018	(r335868)
+++ head/stand/uboot/common/main.c	Mon Jul  2 18:23:43 2018	(r335869)
@@ -444,8 +444,10 @@ main(int argc, char **argv)
 	/*
 	 * Enumerate U-Boot devices
 	 */
-	if ((devs_no = ub_dev_enum()) == 0)
-		panic("no U-Boot devices found");
+	if ((devs_no = ub_dev_enum()) == 0) {
+		printf("no U-Boot devices found");
+		goto do_interact;
+	}
 	printf("Number of U-Boot devices: %d\n", devs_no);
 
 	get_load_device(&load_type, &load_unit, &load_slice, &load_partition);
@@ -492,6 +494,7 @@ main(int argc, char **argv)
 	env_setenv("loaddev", EV_VOLATILE, ldev, env_noset, env_nounset);
 	printf("Booting from %s\n", ldev);
 
+do_interact:
 	setenv("LINES", "24", 1);		/* optional */
 	setenv("prompt", "loader>", 1);
 


More information about the svn-src-head mailing list