Implement clone threshold to work around Redox problems

This commit is contained in:
Jeremy Soller
2025-09-26 11:25:22 -06:00
parent 5e044e88c0
commit eea5c96137
3 changed files with 28 additions and 20 deletions
+4 -2
View File
@@ -116,7 +116,7 @@ fn main() {
let free_old = fs_old.allocator().free() * redoxfs::BLOCK_SIZE;
let used_old = size_old - free_old;
let mut last_percent = 0;
match clone(&mut fs_old, &mut fs, move |used| {
let clone_res = clone(&mut fs_old, &mut fs, move |used| {
let percent = (used * 100) / used_old;
if percent != last_percent {
eprint!(
@@ -127,7 +127,9 @@ fn main() {
);
last_percent = percent;
}
}) {
});
eprintln!();
match clone_res {
Ok(()) => (),
Err(err) => {
println!(