Skip to content

Releases

v0.5.0

Choose a tag to compare

@github-actions github-actions released this 23 Nov 13:46
feat: add `df` — how much of the image is in use

`stat` reports the geometry: how many blocks the filesystem has. It does not say
how many are spoken for, which is the question after packing a set of programs
into a 16 MiB image — did they fit, and how much room is left.

`easyfs df` reads the two bitmaps and prints used/total for inodes, data blocks
and bytes, plus --json. Usage counts allocation, not reachability: an inode a
packer allocated but never linked counts as used, which is what a disk-usage
number should say. `check` is what distinguishes a leak from a file, and there is
a test pinning exactly that difference.

The library gains `Image::inode_usage` and `Image::data_block_usage`.

Also adds CONTRIBUTING.md, which states the rules CI already enforces rather than
new ones, repeats the format traps that cost time to learn, and names what the
project will not do.

Build note for anyone working here: after `cargo publish`, this checkout's target
directory got into a state where cargo reported `Fresh` and never rebuilt despite
a changed source file — the binary kept reproducing the old behaviour and the new
subcommand was simply absent. `cargo clean -p` was not enough; `rm -rf target`
was. Worth knowing before concluding a change did nothing.

v0.4.1

Choose a tag to compare

@github-actions github-actions released this 23 Nov 13:26
fix: stop printing the path twice in `check` output

Adding the path to a finding made the CLI print it twice, because the message
already names the file: `/hello.txt: /hello.txt (inode 1) is reachable but the
bitmap marks it free`. The prefix is gone; the message carries the path and
--json is unchanged.

Also adds docs/ARTICLE.md, a Chinese and English write-up of what the tool is for
and what the format cost to learn, written so it can be published as-is.

Worth noting for anyone building this locally: cargo reported `Finished` without
recompiling even though src/main.rs was newer than the binary, and the stale
binary reproduced the old output. `cargo clean -p easyfs-inspect` was what
actually forced the rebuild. Cargo hardlinks target/debug/easyfs.exe to the
artifact in deps/, so the mtime of the former says nothing about freshness.

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 23 Nov 10:03
docs: write the format down, and check that the document stays true

docs/FORMAT.md is a byte-level description of the on-disk format: region layout,
superblock fields, inode record, bitmap bit order, block addressing, directory
entries, the maximum file size implied by the three pointer levels, and the
constraints a writer has to satisfy. It ends with a 40-line Python reader that
parses an image without any of this crate.

Writing the format down is worth more than another command: it makes the
repository a reference for the layout rather than only a tool that happens to
read it, and it lets someone writing a parser in another language check their
work against something other than the C-adjacent code they are porting.

A document that describes behaviour is a claim, and claims rot. The CI job now
extracts that Python reader from the markdown, runs it against the demo image,
and diffs its output against `easyfs ls`. If the format description and the
implementation drift apart, the build fails instead of shipping a document that
lies — which is exactly the mistake made earlier in this project, where a README
described a FUSE mount that never existed.

Machine-readable output, so a build step does not have to parse prose:

- `ls --json` — array of name, inode, type, size
- `stat --json` — the geometry object
- `check --json` — ok flag, findings with severity/code/path/message, counters
- `file --json` — size, is_elf, the identification fields, the problem if any
- `diff --json` — array of path, change, before_size, after_size
- `ls --inode` — inode numbers in the text listing

`check` keeps exiting non-zero on an error in both modes, so it gates a pipeline
and leaves a record at the same time. CI validates every JSON output with
`python3 -m json.tool`.

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 23 Nov 09:50
feat: identify binaries and compare images

Three additions, all read-only.

`easyfs file` names a file's type from its first bytes. When a kernel cannot load
a program the reason is often the ELF identification: wrong class, wrong byte
order, wrong machine. Reading those fields turns "the kernel crashes" into "this
is an x86-64 binary". Only the identification and two header words are read; this
is not an ELF parser.

`easyfs check --payload` runs that check over every file that starts with the ELF
magic. A malformed identification is an error; a valid ELF for another machine is
a warning, because an image can legitimately carry one.

`easyfs diff <a> <b>` lists what changed between two images, by path and content.
Rebuilding fs.img is the normal fix for a broken image, and the next question is
what actually changed. Directories are compared by their entry list, so a rename
shows up rather than looking like an unchanged directory.

`check` findings now carry the path as well as the inode, and the messages name
the file: a report points at /hello.txt, not at inode 1.

Tests: nine ELF header cases, four diff cases, six payload and path cases, on top
of the existing suites — 37 in total.

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 23 Nov 09:32
ci: install a cross linker for the aarch64 Linux build

The first release run failed on aarch64-unknown-linux-gnu only: rustup installs
the target, but nothing provides an aarch64 linker on the runner, so the link
step fails. Install gcc-aarch64-linux-gnu for that matrix entry and point cargo
at it. The other four targets built and attached to the release.