From e5cfac489da565fb13fb06126428bb44cc64d11c Mon Sep 17 00:00:00 2001 From: Krystian Lewandowski Date: Wed, 15 Nov 2017 18:29:06 +0100 Subject: [PATCH 1/2] 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. --- sys/dev/pci/pci_subr.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/dev/pci/pci_subr.c b/sys/dev/pci/pci_subr.c index 65372632f..9ddc944f2 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) */ From e00008c8a8d8dda798f979f93037777f4f6d09d8 Mon Sep 17 00:00:00 2001 From: Krystian Lewandowski Date: Thu, 16 Nov 2017 11:06:01 +0100 Subject: [PATCH 2/2] Removing additional whitespaces --- sys/dev/pci/pci_subr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/pci/pci_subr.c b/sys/dev/pci/pci_subr.c index 9ddc944f2..32a9b6390 100644 --- a/sys/dev/pci/pci_subr.c +++ b/sys/dev/pci/pci_subr.c @@ -618,10 +618,10 @@ pci_subclass_name(pcireg_t reg) } if (subclassp) { - return subclassp->name; + return subclassp->name; } else { return NULL; - } + } } #endif /* defined(__minix) && defined(_PCI_SERVER) */