Patch Virtio PCI net driver to log message before dying
This commit is contained in:
parent
7eadc89a83
commit
90331128e8
|
@ -127,7 +127,11 @@ in {
|
||||||
vfs_ttf.portInputs = [ libc stb ];
|
vfs_ttf.portInputs = [ libc stb ];
|
||||||
|
|
||||||
virtdev_rom = { };
|
virtdev_rom = { };
|
||||||
virtio_nic_drv = { };
|
|
||||||
|
virtio_nic_drv = {
|
||||||
|
patches = [ ./virtio_net.patch ];
|
||||||
|
postInstall = "mv $out/bin/virtio_*_nic $out/bin/$pname";
|
||||||
|
};
|
||||||
|
|
||||||
wifi_drv.portInputs = [ dde_linux libc openssl ];
|
wifi_drv.portInputs = [ dde_linux libc openssl ];
|
||||||
|
|
||||||
|
|
28
packages/genodelabs/virtio_net.patch
Normal file
28
packages/genodelabs/virtio_net.patch
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
From 9ed1198edd840a1bae24411e86e3ef0e6cab9340 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Emery Hemingway <ehmry@posteo.net>
|
||||||
|
Date: Tue, 10 Nov 2020 14:21:12 +0100
|
||||||
|
Subject: [PATCH] drivers/nic/virtio/pci: log error before exit
|
||||||
|
|
||||||
|
---
|
||||||
|
repos/os/src/drivers/nic/virtio/pci_device.cc | 5 ++++-
|
||||||
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/repos/os/src/drivers/nic/virtio/pci_device.cc b/repos/os/src/drivers/nic/virtio/pci_device.cc
|
||||||
|
index abef1ca5ea..56d2bf6c92 100644
|
||||||
|
--- a/repos/os/src/drivers/nic/virtio/pci_device.cc
|
||||||
|
+++ b/repos/os/src/drivers/nic/virtio/pci_device.cc
|
||||||
|
@@ -50,7 +50,10 @@ struct Virtio_pci_nic::Main
|
||||||
|
log("--- VirtIO PCI driver started ---");
|
||||||
|
env.parent().announce(env.ep().manage(root));
|
||||||
|
}
|
||||||
|
- catch (...) { env.parent().exit(-1); }
|
||||||
|
+ catch (Device_not_found) {
|
||||||
|
+ error("device not found");
|
||||||
|
+ env.parent().exit(-1);
|
||||||
|
+ }
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
2.28.0
|
||||||
|
|
Loading…
Reference in New Issue
Block a user