From 4fb47386f48b75c5a0df19fdfc1e20e8f93a5275 Mon Sep 17 00:00:00 2001 From: ko1N Date: Sat, 21 Nov 2020 23:26:52 +0100 Subject: [PATCH] Reverted back to memflow 0.1 --- memflow-pcileech/Cargo.toml | 3 ++- memflow-pcileech/src/lib.rs | 15 +++++---------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/memflow-pcileech/Cargo.toml b/memflow-pcileech/Cargo.toml index 715cfe1..35bc00c 100644 --- a/memflow-pcileech/Cargo.toml +++ b/memflow-pcileech/Cargo.toml @@ -16,7 +16,8 @@ categories = [ "api-bindings", "memory-management", "os" ] crate-type = ["lib", "cdylib"] [dependencies] -memflow = { git = "https://github.com/memflow/memflow", branch = "next", features = ["inventory", "serde_derive"] } +memflow = { version = "0.1", features = ["inventory", "serde_derive"] } +memflow-derive = { version = "0.1" } log = { version = "0.4", default-features = false } simple_logger = "1.0" leechcore-sys = { path = "../leechcore-sys" } diff --git a/memflow-pcileech/src/lib.rs b/memflow-pcileech/src/lib.rs index 80aa182..3426d58 100644 --- a/memflow-pcileech/src/lib.rs +++ b/memflow-pcileech/src/lib.rs @@ -6,10 +6,10 @@ use std::path::Path; use std::ptr; use std::sync::{Arc, Mutex}; -use log::{error, info, Level}; +use log::{error, info}; -use memflow::derive::connector; -use memflow::prelude::v1::*; +use memflow::*; +use memflow_derive::connector; use leechcore_sys::*; @@ -283,13 +283,8 @@ impl PhysicalMemory for PciLeech { } /// Creates a new PciLeech Connector instance. -#[connector(name = "pcileech", ty = "PciLeech")] -pub fn create_connector(log_level: Level, args: &ConnectorArgs) -> Result { - simple_logger::SimpleLogger::new() - .with_level(log_level.to_level_filter()) - .init() - .ok(); - +#[connector(name = "pcileech")] +pub fn create_connector(args: &ConnectorArgs) -> Result { let device = args .get("device") .or_else(|| args.get_default())