summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2024-11-27 02:38:36 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2024-11-27 02:38:36 +0000
commitc83f439c00f8786de0817958b75687ba4fe110f7 (patch)
treeb0d4ba64a1887a6a2ddff8132d4b55f78c8d2962 /sys
parent94db205a924e20ea836be9551f87653a03683e1b (diff)
continue enumerating devices if a device is not matched
fixes xbf(4) and xnf(4) not attaching on XCP-ng 8.3/Xen 4.17 which has "device/9pfs/" from Joel Knight
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pv/xen.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/dev/pv/xen.c b/sys/dev/pv/xen.c
index cb008a4ae8c..3bcc91430a1 100644
--- a/sys/dev/pv/xen.c
+++ b/sys/dev/pv/xen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xen.c,v 1.99 2024/11/27 02:14:48 jsg Exp $ */
+/* $OpenBSD: xen.c,v 1.100 2024/11/27 02:38:35 jsg Exp $ */
/*
* Copyright (c) 2015, 2016, 2017 Mike Belopuhov
@@ -1365,15 +1365,14 @@ xen_attach_device(struct xen_softc *sc, struct xen_devlist *xdl,
sizeof(xa.xa_backend))) {
DPRINTF("%s: failed to identify \"backend\" for "
"\"%s\"\n", sc->sc_dev.dv_xname, xa.xa_node);
- return (EIO);
}
if (xs_getnum(sc, xa.xa_node, "backend-id", &res) || res > UINT16_MAX) {
DPRINTF("%s: invalid \"backend-id\" for \"%s\"\n",
sc->sc_dev.dv_xname, xa.xa_node);
- return (EIO);
}
- xa.xa_domid = (uint16_t)res;
+ if (res <= UINT16_MAX)
+ xa.xa_domid = (uint16_t)res;
xdv = malloc(sizeof(struct xen_device), M_DEVBUF, M_ZERO | M_NOWAIT);
if (xdv == NULL)
@@ -1427,7 +1426,7 @@ xen_probe_devices(struct xen_softc *sc)
printf("%s: failed to attach \"%s/%s\"\n",
sc->sc_dev.dv_xname, path,
(const char *)iovp2[j].iov_base);
- goto out;
+ continue;
}
}
/* Setup a watch for every device subtree */