Drop -m/-u/-c short options for --mount/--umount/--cleanup

Now that -r/--run and -x/--exec cover normal use, --mount/--umount/--cleanup
are debug-only escape hatches not worth a short letter. Reassigned their
long_options codes to long-option-only constants (options::mount/umount/
cleanup) and dropped m:/u:/c: from getopt_long's own short-options string.

Updated the fixture smoke test (tests/run_test.py) and docs, which invoked
-m/-u/-c directly.
This commit is contained in:
2026-09-05 08:43:58 +00:00
parent cdf9dcd210
commit d2d631117d
5 changed files with 59 additions and 41 deletions
+5 -4
View File
@@ -329,8 +329,9 @@ Source layout (all under `src/`):
compiled into this build" message and returns nonzero instead of
failing to link. `-t`'s own leftover-args capture requires a literal
`--` before any Catch2 option that looks like one of slocker-lite's own
(`-r/--reporter` collides with `-r/--run`, `-c/--section` with
`-c/--cleanup`) — a bare tag expression like `-t -- "[unit]"` needs it
(`-r/--reporter` collides with `-r/--run` `-c/--section` no longer
collides with anything now that `--cleanup` dropped its own `-c` short
form) — a bare tag expression like `-t -- "[unit]"` needs it
too by convention, though `getopt_long`'s own permutation happens to let
a `-t "[unit]"` without `--` work anyway, since `"[unit]"` doesn't start
with `-`. Distinct from the Meson-driven fixture smoke test under
@@ -2277,8 +2278,8 @@ Build directory is `buildDir/` (already configured).
- Build: `meson compile -C buildDir` (or `ninja -C buildDir`) — also builds
`buildDir/slocker-lite-priv-drop`, the statically-linked helper `-r --user` needs
(see `priv_drop_helper.cpp` in "Project state")
- Run the executable: `./buildDir/slocker-lite -m <image.tar>` (see `--help` for the
full flag list: `-m/--mount`, `-r/--run`, `-u/--umount`, `-c/--cleanup`,
- Run the executable: `./buildDir/slocker-lite --mount <image.tar>` (see `--help` for the
full flag list: `--mount`, `-r/--run`, `--umount`, `--cleanup`,
`-l/--list-images`, `-i/--inspect`, `-x/--exec`, `--kill`, `--no-nsenter`, `-D/--daemonize`,
`--user`, `--group`, `--hostname`, `--env`, `--env-file`, `-v/--volume`, `--list-volumes`, `--delete-volume`,
`--delete-volume-full`, `-n/--network`, `--extern`, `--intern`, `--subnet`, `--with-ipv6`, `--subnet6`,