Skip to content

Commit

Permalink
Merge pull request #345 from Flowdalic/mount-print-error
Browse files Browse the repository at this point in the history
mount: print a helpful error message
  • Loading branch information
koverstreet authored Dec 29, 2024
2 parents 1055935 + 9ed0f3f commit 7210d5c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/commands/mount.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use std::{
use anyhow::{ensure, Result};
use bch_bindgen::{bcachefs, bcachefs::bch_sb_handle, opt_set, path_to_cstr};
use clap::Parser;
use log::{debug, info};
use log::{debug, error, info};
use uuid::Uuid;

use crate::{
Expand Down Expand Up @@ -385,6 +385,9 @@ pub fn mount(mut argv: Vec<String>, symlink_cmd: Option<&str>) -> std::process::

match cmd_mount_inner(&cli) {
Ok(_) => std::process::ExitCode::SUCCESS,
Err(_) => std::process::ExitCode::FAILURE,
Err(e) => {
error!("Mount failed: {e}");
std::process::ExitCode::FAILURE
}
}
}

0 comments on commit 7210d5c

Please sign in to comment.