Fixed merge issue

pull/7/head
ko1N 4 years ago
parent eb96015364
commit b18c90689c

@ -18,7 +18,7 @@ fn main() {
ConnectorArgs::new() ConnectorArgs::new()
}; };
let mut conn = memflow_pcileech::create_connector(&conn_args) let mut conn = memflow_pcileech::create_connector(Level::Debug, &conn_args)
.expect("unable to initialize memflow_pcileech"); .expect("unable to initialize memflow_pcileech");
let mut mem = vec![0; 8]; let mut mem = vec![0; 8];

@ -7,10 +7,10 @@ use std::ptr;
use std::slice; use std::slice;
use std::sync::{Arc, Mutex}; use std::sync::{Arc, Mutex};
use log::{error, info}; use log::{error, info, Level};
use memflow::prelude::v1::*;
use memflow::derive::connector; use memflow::derive::connector;
use memflow::prelude::v1::*;
use leechcore_sys::*; use leechcore_sys::*;
@ -339,7 +339,12 @@ impl PhysicalMemory for PciLeech {
/// Creates a new PciLeech Connector instance. /// Creates a new PciLeech Connector instance.
#[connector(name = "pcileech", ty = "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