From: Krystian Lewandowski Date: Wed, 15 Nov 2017 17:29:06 +0000 (+0100) Subject: pci server crashes during boot on Qubes OS X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zpipe.c?a=commitdiff_plain;h=refs%2Fchanges%2F06%2F3506%2F2;p=minix.git pci server crashes during boot on Qubes OS I tried to launch Minix3 in Qubes OS. While there is no problem to boot minix as a qube (in Qubes OS terminology) before 3641562, it fails with the commit (and after). I didn't digg into PCI handling but this change fixes the problem. Minix handles NULL case from pci_subclass_name. Change-Id: I162424d92b613598e6eb845a71f90a02e31041db --- diff --git a/sys/dev/pci/pci_subr.c b/sys/dev/pci/pci_subr.c index 65372632f..462fd5672 100644 --- a/sys/dev/pci/pci_subr.c +++ b/sys/dev/pci/pci_subr.c @@ -617,7 +617,11 @@ pci_subclass_name(pcireg_t reg) subclassp++; } - return subclassp->name; + if (subclassp) { + return subclassp->name; + } else { + return NULL; + } } #endif /* defined(__minix) && defined(_PCI_SERVER) */