Skip to content

Commit

Permalink
Writes path length
Browse files Browse the repository at this point in the history
  • Loading branch information
ultimaweapon committed Nov 15, 2024
1 parent 1c099c1 commit 0109090
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions dumper/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,14 +226,12 @@ unsafe fn dump_mount<K: Kernel>(k: K, fd: c_int, mp: *mut K::Mount, lock: MtxLoc
};

// Write type and path.
if !p.path.is_empty() {
if !write_dump(k, fd, &[ty.into()]) {
return false;
}
if !write_dump(k, fd, &[ty.into()]) {
return false;
}

if !write_dump(k, fd, &p.path) {
return false;
}
if !write_dump(k, fd, &p.path.len().to_le_bytes()) || !write_dump(k, fd, &p.path) {
return false;
}

// Dump.
Expand Down

0 comments on commit 0109090

Please sign in to comment.