mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-28 17:44:10 +00:00
4d93ead5fc
Add example/mkfs.rs to demonstorate how to use the library and make it easier to use it for debugging with existing e2fsprogs tools. BUG=b:329359333 TEST=cargo run --example mkfs -- --path ./foo.ext2 Change-Id: I98966d317f053794607b722f38493568d0d96ced Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5404439 Reviewed-by: Dennis Kempin <denniskempin@google.com> Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org> Reviewed-by: Takaya Saeki <takayas@chromium.org>
650 B
650 B
ext2
This crate provides utilities to create ext2 file system on memory or a file.
examples/mkfs.rs
shows how to use this library. This program is our alternative to mkfs.ext2
that create an ext2 file system on a file and useful for debugging this ext2 itself with existing
utilities in e2fsprogs
such as fsck
and dumpe2fs
.
$ cargo run --release --example mkfs -- --path disk.img
Create disk.img
$ dumpe2fs disk.img
dumpe2fs 1.47.0 (5-Feb-2023)
Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem UUID: c6e49d8f-106f-4472-b0e8-6babcc3fa496
Filesystem magic number: 0xEF53
...