mirror of
https://gitlab.steamos.cloud/holo/steamos-manager.git
synced 2025-07-18 12:16:43 -04:00
ftrace: Refactor refs a bit
This commit is contained in:
parent
3c78aa32fb
commit
85253f66cc
2 changed files with 3 additions and 3 deletions
|
@ -120,7 +120,7 @@ impl DaemonContext for RootContext {
|
||||||
self.state = state;
|
self.state = state;
|
||||||
|
|
||||||
let connection = daemon.get_connection();
|
let connection = daemon.get_connection();
|
||||||
let ftrace = Ftrace::init(connection).await?;
|
let ftrace = Ftrace::init(&connection).await?;
|
||||||
daemon.add_service(ftrace);
|
daemon.add_service(ftrace);
|
||||||
|
|
||||||
self.reload_ds_inhibit(daemon).await?;
|
self.reload_ds_inhibit(daemon).await?;
|
||||||
|
|
|
@ -58,7 +58,7 @@ async fn setup_traces(base: &Path) -> Result<()> {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Ftrace {
|
impl Ftrace {
|
||||||
pub async fn init(connection: Connection) -> Result<Ftrace> {
|
pub async fn init(connection: &Connection) -> Result<Ftrace> {
|
||||||
let path = Self::base();
|
let path = Self::base();
|
||||||
fs::create_dir_all(&path).await?;
|
fs::create_dir_all(&path).await?;
|
||||||
setup_traces(path.as_path()).await?;
|
setup_traces(path.as_path()).await?;
|
||||||
|
@ -67,7 +67,7 @@ impl Ftrace {
|
||||||
.open_receiver(path.join("trace_pipe"))?;
|
.open_receiver(path.join("trace_pipe"))?;
|
||||||
Ok(Ftrace {
|
Ok(Ftrace {
|
||||||
pipe: Some(BufReader::new(file)),
|
pipe: Some(BufReader::new(file)),
|
||||||
proxy: TraceHelperProxy::new(&connection).await?,
|
proxy: TraceHelperProxy::new(connection).await?,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue