mirror of
https://gitlab.steamos.cloud/holo/steamos-manager.git
synced 2025-07-18 04:06:47 -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;
|
||||
|
||||
let connection = daemon.get_connection();
|
||||
let ftrace = Ftrace::init(connection).await?;
|
||||
let ftrace = Ftrace::init(&connection).await?;
|
||||
daemon.add_service(ftrace);
|
||||
|
||||
self.reload_ds_inhibit(daemon).await?;
|
||||
|
|
|
@ -58,7 +58,7 @@ async fn setup_traces(base: &Path) -> Result<()> {
|
|||
}
|
||||
|
||||
impl Ftrace {
|
||||
pub async fn init(connection: Connection) -> Result<Ftrace> {
|
||||
pub async fn init(connection: &Connection) -> Result<Ftrace> {
|
||||
let path = Self::base();
|
||||
fs::create_dir_all(&path).await?;
|
||||
setup_traces(path.as_path()).await?;
|
||||
|
@ -67,7 +67,7 @@ impl Ftrace {
|
|||
.open_receiver(path.join("trace_pipe"))?;
|
||||
Ok(Ftrace {
|
||||
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