Skip to content

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 23 Nov 09:50
· 7 commits to main since this release
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.