Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Jul 2018 18:23:44 +0000 (UTC)
From:      Emmanuel Vadot <manu@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r335869 - head/stand/uboot/common
Message-ID:  <201807021823.w62INi8d077750@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807021823.w62INi8d077750>