Since the driver only allows you to mount volumes based on their index,
sometimes it's hard to remember which volume goes by which number:
https://github.com/linux-apfs/linux-apfs-rw/issues/69
Implement a simple tool to list the volumes in a container that isn't
mounted.
Signed-off-by: Ernesto A. Fernández <ernesto@corellium.com>
Make all tools report the current git commit id (or tag, if any) when
called with the "-v" flag. This will be useful to confirm I'm not
running an old version by mistake.
The makefile changes here are a bit awkward. In general this repo's
structure isn't great. I should look into that at some point.
Signed-off-by: Ernesto A. Fernández <ernesto@corellium.com>
The filesystem superblock has an apfs_formatted_by field to report which
mkfs implementation was responsible for creating the container in the
first place. Improve the version information provided, following the
recent driver changes from commit e0b1eeb29d2a ("Include release info in
apfs_modified_by field").
One small difference to note with the driver case is that we need to use
the "--always" flag with "git describe", or else it fails. The reason is
that I've never made a tagged release here. I should get to that soon.
Signed-off-by: Ernesto A. Fernández <ernesto@corellium.com>
Write a very simple tool that requests a new snapshot to the driver. I
still need to implement snapshots over there, but it's better to have
this ready for testing.
Signed-off-by: Ernesto A. Fernández <ernesto@corellium.com>
Instead of linking each library file by itself, assemble an archive with
all the common library code. Use this to simplify the fsck Makefile,
which no longer needs to relink every single time.
Signed-off-by: Ernesto A. Fernández <ernesto.mnd.fernandez@gmail.com>
Write a simple fsck tool that only verifies the checksum of block zero,
and reports if it matches the latest valid superblock. As it grows,
this tool should help add write functionality to the apfs module.
Signed-off-by: Ernesto A. Fernández <ernesto.mnd.fernandez@gmail.com>