Stop assuming that udisks2 automatically mounted filesystem

usermode
Asya 2022-12-17 10:24:34 +03:00
parent e92809c1da
commit 25afe9fec7
Signed by: asya
GPG Key ID: 4679BF7DCC044783
1 changed files with 12 additions and 12 deletions

View File

@ -147,12 +147,12 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
.path(&filesystem)?
.build()?;
// Obtain mountpoint
let mountpoint = loop {
if let Some(m) = fsproxy.mount_points()?.get(0) {
break m.to_string();
}
};
// Mount the filesystem
let mountpoint = fsproxy.mount(MountOptions {
no_user_interaction: true,
fs_type: String::new(),
mount_options: String::new(),
})?;
// copy ./base/* over to ./disk
Command::new("sh")
@ -363,12 +363,12 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
.path(&parts[0])?
.build()?;
// Obtain mountpoint
let mountpoint = loop {
if let Some(m) = fsproxy.mount_points()?.get(0) {
break m.to_string();
}
};
// Mount the filesystem
let mountpoint = fsproxy.mount(MountOptions {
no_user_interaction: true,
fs_type: String::new(),
mount_options: String::new(),
})?;
// copy the kernel over to ./disk/boot/kernel
Command::new("cp")