diff options
author | Thomas Mühlbacher <tmuehlbacher@posteo.net> | 2024-05-31 03:54:35 +0200 |
---|---|---|
committer | Thomas Mühlbacher <tmuehlbacher@posteo.net> | 2024-05-31 03:56:53 +0200 |
commit | 9ec185437d4ffb25e636df4b83cdce01ae08aa7c (patch) | |
tree | 79c1c356892dc4cb27fa44b399dc03bb8f51c399 /src/commands | |
parent | 96843fc95d50c270dc6903f30b57cc62a793daf9 (diff) |
fix: evaluate KeyHandle Result
This one is sort of bad to have missed, ouch.
Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
Diffstat (limited to 'src/commands')
-rw-r--r-- | src/commands/mount.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/commands/mount.rs b/src/commands/mount.rs index 622f6cb9..f6c845f3 100644 --- a/src/commands/mount.rs +++ b/src/commands/mount.rs @@ -343,7 +343,7 @@ fn cmd_mount_inner(opt: Cli) -> Result<()> { let uuid = first_sb.sb().uuid(); if unsafe { bcachefs::bch2_sb_is_encrypted(first_sb.sb) } { - let _key_handle = KeyHandle::new_from_search(&uuid).or_else(|_| { + 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) { Ok(p) => Some(KeyHandle::new(&first_sb, &p)), @@ -356,7 +356,7 @@ fn cmd_mount_inner(opt: Cli) -> Result<()> { } }) .unwrap_or_else(|| opt.unlock_policy.apply(&first_sb)) - }); + })?; } if let Some(mountpoint) = opt.mountpoint { |