From owner-svn-src-head@freebsd.org Mon Jul 2 18:23:44 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D46C31033931; Mon, 2 Jul 2018 18:23:44 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 729C974353; Mon, 2 Jul 2018 18:23:44 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4F8041121C; Mon, 2 Jul 2018 18:23:44 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w62INiQK077751; Mon, 2 Jul 2018 18:23:44 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w62INi8d077750; Mon, 2 Jul 2018 18:23:44 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201807021823.w62INi8d077750@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Mon, 2 Jul 2018 18:23:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335869 - head/stand/uboot/common X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/stand/uboot/common X-SVN-Commit-Revision: 335869 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2018 18:23:45 -0000 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);