|
|
@ -147,11 +147,11 @@ pub fn fmt_mount(mountpoint: &String, filesystem: &String, blockdevice: &String)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
pub fn partition(device: PathBuf, mode: PartitionMode, efi: bool, partitions: Vec<args::Partition>) {
|
|
|
|
pub fn partition(device: PathBuf, mode: PartitionMode, efi: bool, partitions: Vec<args::Partition>) {
|
|
|
|
if !device.exists() {
|
|
|
|
|
|
|
|
crash(format!("The device {device:?} doesn't exist"), 1);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
match mode {
|
|
|
|
match mode {
|
|
|
|
PartitionMode::Auto => {
|
|
|
|
PartitionMode::Auto => {
|
|
|
|
|
|
|
|
if !device.exists() {
|
|
|
|
|
|
|
|
crash(format!("The device {device:?} doesn't exist"), 1);
|
|
|
|
|
|
|
|
}
|
|
|
|
log::debug!("automatically partitioning {device:?}");
|
|
|
|
log::debug!("automatically partitioning {device:?}");
|
|
|
|
if efi {
|
|
|
|
if efi {
|
|
|
|
partition_with_efi(&device);
|
|
|
|
partition_with_efi(&device);
|
|
|
|