Add CLI option parsing and implement layer unmounting
Replace the implicit single-argument invocation with getopt_long-based flags: -m/--mount (existing mount flow, now explicit), -u/--umount (unmounts a layer via containers-storage), -t/--test (stub), -l/--log-level (runtime spdlog level), -h/--help, -V/--version. --mount now also prints the top layer's ID so it can be passed to --umount. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -36,7 +36,9 @@ Build directory is `buildDir/` (already configured).
|
||||
|
||||
- Configure (only needed if `buildDir/` is missing or deleted): `meson setup buildDir`
|
||||
- Build: `meson compile -C buildDir` (or `ninja -C buildDir`)
|
||||
- Run the executable: `./buildDir/slocker_lite <image.tar>`
|
||||
- Run the executable: `./buildDir/slocker_lite -m <image.tar>` (see `--help` for the
|
||||
full flag list: `-m/--mount`, `-u/--umount`, `-t/--test`, `-l/--log-level`,
|
||||
`-h/--help`, `-V/--version`)
|
||||
- Run tests: `meson test -C buildDir`
|
||||
|
||||
## Code style
|
||||
|
||||
Reference in New Issue
Block a user