Updated to memflow/next branch

pull/7/head
ko1N 4 years ago
parent 7ed4d33776
commit e0315132fe

@ -16,13 +16,10 @@ categories = [ "api-bindings", "memory-management", "os" ]
crate-type = ["lib", "cdylib"] crate-type = ["lib", "cdylib"]
[dependencies] [dependencies]
memflow = { version = "0.1", features = ["inventory", "serde_derive"] } memflow = { git = "https://github.com/memflow/memflow", branch = "next", features = ["inventory", "serde_derive"] }
memflow-derive = { version = "0.1" }
log = { version = "0.4", default-features = false } log = { version = "0.4", default-features = false }
leechcore-sys = { path = "../leechcore-sys" }
[dev-dependencies]
simple_logger = "1.0" simple_logger = "1.0"
leechcore-sys = { path = "../leechcore-sys" }
[features] [features]
default = [] default = []

@ -6,10 +6,10 @@ use std::path::Path;
use std::ptr; use std::ptr;
use std::sync::{Arc, Mutex}; use std::sync::{Arc, Mutex};
use log::{error, info}; use log::{error, info, Level};
use memflow::*; use memflow::prelude::v1::*;
use memflow_derive::connector; use memflow::derive::connector;
use leechcore_sys::*; use leechcore_sys::*;
@ -283,8 +283,13 @@ impl PhysicalMemory for PciLeech {
} }
/// Creates a new PciLeech Connector instance. /// Creates a new PciLeech Connector instance.
#[connector(name = "pcileech")] #[connector(name = "pcileech", ty = "PciLeech")]
pub fn create_connector(args: &ConnectorArgs) -> Result<PciLeech> { pub fn create_connector(log_level: Level, args: &ConnectorArgs) -> Result<PciLeech> {
simple_logger::SimpleLogger::new()
.with_level(log_level.to_level_filter())
.init()
.ok();
let device = args let device = args
.get("device") .get("device")
.or_else(|| args.get_default()) .or_else(|| args.get_default())

Loading…
Cancel
Save