Add -k session to bcachefs unlock command.

This commit is contained in:
2026-06-24 18:46:04 +02:00
parent 212fa7ed44
commit 75c043b652
2 changed files with 22 additions and 3 deletions
+3 -2
View File
@@ -145,9 +145,10 @@ pub fn bcachefs_unlock(pass: String, dev: &str) -> Result<bool, ExecCommandError
use std::io::Read;
use std::io::Write;
use std::process::Stdio;
// "-k", "session" is important as it stores key in sessyin keyring what allows
// system to mount filesystem after switch_root
let mut child = Command::new("bcachefs")
.arg("unlock")
.arg(dev)
.args(&vec!["unlock", "-k", "session", dev])
.stdin(Stdio::piped())
.stdout(Stdio::piped())
.stderr(Stdio::piped())