Crates.io | auto_mount |
lib.rs | auto_mount |
version | 0.1.5 |
source | src |
created_at | 2022-08-19 06:25:06.893947 |
updated_at | 2022-08-22 10:32:08.306462 |
description | auto_mount has a function that automatically mounts a newly inserted device as a gpt partition. |
homepage | |
repository | https://github.com/ski0090/auto_mount |
max_upload_size | |
id | 648576 |
size | 14,567 |
auto_mount has a function that automatically mounts a newly inserted device as a gpt partition.
All hdds in /dev/sd*
will be formatted.
use auto_mount::{
change_devices_to_gpt, create_partition, filter_unmounted_hdd_devices, find_connected_satas,
format_devices, mount_devices,
};
fn main() {
let devices = find_connected_satas();
let devices = filter_unmounted_hdd_devices(devices);
change_devices_to_gpt(&devices);
let devices = create_partition(&devices);
format_devices(&devices);
mount_devices(&devices);
}
Please register improvements, etc. in the issue
gool luck!