diff --git a/drivers/common/src/lib.rs b/drivers/common/src/lib.rs index 8259bbdc53..9509b51f3d 100644 --- a/drivers/common/src/lib.rs +++ b/drivers/common/src/lib.rs @@ -40,7 +40,7 @@ pub fn init() { pub fn memory_root_fd() -> &'static libredox::Fd { MEMORY_ROOT_FD .get() - .expect("acpid: failed to get memory_root_fd") + .expect("drivers common: memory root fd not initialized. Please call `common::init` in your main function.") } /// Specifies the write behavior for a specific region of memory diff --git a/drivers/storage/virtio-blkd/src/main.rs b/drivers/storage/virtio-blkd/src/main.rs index d21236b377..ef703afa5c 100644 --- a/drivers/storage/virtio-blkd/src/main.rs +++ b/drivers/storage/virtio-blkd/src/main.rs @@ -99,6 +99,7 @@ pub struct BlockVirtRequest { const_assert_eq!(core::mem::size_of::(), 16); fn main() { + common::init(); pcid_interface::pci_daemon(daemon_runner); }