summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/commands/mount.rs2
-rw-r--r--src/key.rs5
2 files changed, 3 insertions, 4 deletions
diff --git a/src/commands/mount.rs b/src/commands/mount.rs
index 5782b3ab..86149fa8 100644
--- a/src/commands/mount.rs
+++ b/src/commands/mount.rs
@@ -339,7 +339,7 @@ fn cmd_mount_inner(opt: Cli) -> Result<()> {
if unsafe { bcachefs::bch2_sb_is_encrypted(first_sb.sb) } {
let _key_handle: KeyHandle = KeyHandle::new_from_search(&uuid).or_else(|_| {
opt.passphrase_file
- .and_then(|path| match Passphrase::new_from_file(&first_sb, path) {
+ .and_then(|path| match Passphrase::new_from_file(path) {
Ok(p) => Some(KeyHandle::new(&first_sb, &p)),
Err(e) => {
error!(
diff --git a/src/key.rs b/src/key.rs
index 0e061ee5..81d4e3c0 100644
--- a/src/key.rs
+++ b/src/key.rs
@@ -168,12 +168,11 @@ impl Passphrase {
Ok(Self(CString::new(passphrase.trim_end_matches('\n'))?))
}
- pub fn new_from_file(sb: &bch_sb_handle, passphrase_file: impl AsRef<Path>) -> Result<Self> {
+ pub fn new_from_file(passphrase_file: impl AsRef<Path>) -> Result<Self> {
let passphrase_file = passphrase_file.as_ref();
info!(
- "Attempting to unlock key for filesystem {} with passphrase from file {}",
- sb.sb().uuid(),
+ "Attempting to unlock key with passphrase from file {}",
passphrase_file.display()
);