blob: 57ca3fceda7c4015a21e0eaa3f9a096b924eb020 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
mod block_device;
use std::fs::File;
use std::path::PathBuf;
use clap::Parser;
use users::{get_current_gid, get_current_uid};
#[derive(Parser, Debug)]
#[command(author, version, about)]
struct Args {
block_device: Option<PathBuf>,
start_point: Option<usize>,
length: Option<usize>,
}
fn main() {
let args = Args::parse();
let device_path = args.block_device.unwrap();
println!("{:?}", device_path.as_path());
let mut device = File::open(device_path.as_path()).unwrap();
}
|