diff options
author | br <br@FreeBSD.org> | 2016-02-11 11:21:45 +0000 |
---|---|---|
committer | br <br@FreeBSD.org> | 2016-02-11 11:21:45 +0000 |
commit | 22740a9120e19a52ed66c53b7f37749b5132535a (patch) | |
tree | afa73f72d5ad938158891c431b326c778aecbcb1 /sys/riscv | |
parent | 36dd28d18c58d2fb7140045cad5e28ff34a299b2 (diff) | |
download | FreeBSD-src-22740a9120e19a52ed66c53b7f37749b5132535a.zip FreeBSD-src-22740a9120e19a52ed66c53b7f37749b5132535a.tar.gz |
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
Diffstat (limited to 'sys/riscv')
-rw-r--r-- | sys/riscv/htif/htif.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/riscv/htif/htif.c b/sys/riscv/htif/htif.c index 08e6a43..f8143dc 100644 --- a/sys/riscv/htif/htif.c +++ b/sys/riscv/htif/htif.c @@ -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); |