ftrace: Refactor refs a bit

This commit is contained in:
Vicki Pfau 2025-04-07 20:24:58 -07:00
parent 3c78aa32fb
commit 85253f66cc
2 changed files with 3 additions and 3 deletions

View file

@ -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?;

View file

@ -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?,
})
}