mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-02-23 00:00:02 +03:00
Merge pull request #284 from tmuehlbacher/fix-result-eval
fix: evaluate KeyHandle Result
This commit is contained in:
commit
e739da5da8
@ -337,7 +337,7 @@ fn cmd_mount_inner(opt: Cli) -> Result<()> {
|
|||||||
let uuid = first_sb.sb().uuid();
|
let uuid = first_sb.sb().uuid();
|
||||||
|
|
||||||
if unsafe { bcachefs::bch2_sb_is_encrypted(first_sb.sb) } {
|
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
|
opt.passphrase_file
|
||||||
.and_then(|path| match Passphrase::new_from_file(&first_sb, path) {
|
.and_then(|path| match Passphrase::new_from_file(&first_sb, path) {
|
||||||
Ok(p) => Some(KeyHandle::new(&first_sb, &p)),
|
Ok(p) => Some(KeyHandle::new(&first_sb, &p)),
|
||||||
@ -350,7 +350,7 @@ fn cmd_mount_inner(opt: Cli) -> Result<()> {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.unwrap_or_else(|| opt.unlock_policy.apply(&first_sb))
|
.unwrap_or_else(|| opt.unlock_policy.apply(&first_sb))
|
||||||
});
|
})?;
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(mountpoint) = opt.mountpoint {
|
if let Some(mountpoint) = opt.mountpoint {
|
||||||
|
Loading…
Reference in New Issue
Block a user