Date: Thu, 11 Feb 2016 11:21:45 +0000 (UTC) From: Ruslan Bukin <br@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295508 - head/sys/riscv/htif Message-ID: <201602111121.u1BBLjFj041224@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: br Date: Thu Feb 11 11:21:45 2016 New Revision: 295508 URL: https://svnweb.freebsd.org/changeset/base/295508 Log: Stop device enumeration when we see first empty slot. This fixes operation in QEMU and saves some booting time as well. Pointed out by: Sagar Karandikar <skarandikar@berkeley.edu> Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Modified: head/sys/riscv/htif/htif.c Modified: head/sys/riscv/htif/htif.c ============================================================================== --- head/sys/riscv/htif/htif.c Thu Feb 11 10:48:15 2016 (r295507) +++ head/sys/riscv/htif/htif.c Thu Feb 11 11:21:45 2016 (r295508) @@ -183,9 +183,8 @@ htif_enumerate(struct htif_softc *sc) } len = strnlen(id, sizeof(id)); - if (len <= 0) { - continue; - } + if (len <= 0) + break; if (bootverbose) printf(" %d %s\n", i, id);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201602111121.u1BBLjFj041224>