diff options
| author | salmonik <salmonik@tuta.io> | 2026-11-01 15:52:44 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-11-01 15:52:44 +0100 |
| commit | 316a2a239446fe927e35b029b651cbeb08ff3f48 (patch) | |
| tree | c16bcc30c25c9eaad99445d2a30b703f43c0d091 /docs/adr | |
| parent | bins: read user args from argv[1..]; fix date year digit (diff) | |
| download | rs-dos-316a2a239446fe927e35b029b651cbeb08ff3f48.tar.gz rs-dos-316a2a239446fe927e35b029b651cbeb08ff3f48.zip | |
fs: /bin alias for the system volume
ADR 0006 deferred root-path unification because it "needs VFS
bind/alias machinery". Implement the /bin half: paths whose first
component is `bin` are rewritten to the first mounted volume whose
root has a \bin directory, so `ls /bin/cli`, `cat /bin/cli/x.efi` and
a binary's own fs_resolve("/bin/cli/x.efi") work without knowing the
volume UID.
The alias is transparent — it creates no node, so `ls /` keeps its old
listing and /bin simply does not exist when no system volume is
mounted — and allocates nothing for non-matching paths. exec::resolve
keeps its per-file volume scan (stricter for multiple volumes).
Update ADR 0006 to record the decision and what remains deferred
(\etc and friends at the root).
Diffstat (limited to 'docs/adr')
| -rw-r--r-- | docs/adr/0006-executable-binaries-and-bin-tree.md | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/docs/adr/0006-executable-binaries-and-bin-tree.md b/docs/adr/0006-executable-binaries-and-bin-tree.md index 17109c4..f3de95f 100644 --- a/docs/adr/0006-executable-binaries-and-bin-tree.md +++ b/docs/adr/0006-executable-binaries-and-bin-tree.md | |||
| @@ -48,6 +48,14 @@ and so a launcher can enumerate launchable apps by listing a directory. | |||
| 48 | - **Resolution rule.** For name N: run `\bin\<kind>\N` from the first | 48 | - **Resolution rule.** For name N: run `\bin\<kind>\N` from the first |
| 49 | mounted volume that has it; else the built-in N; else "unknown | 49 | mounted volume that has it; else the built-in N; else "unknown |
| 50 | command". No volume is privileged; no boot-volume identity exists. | 50 | command". No volume is privileged; no boot-volume identity exists. |
| 51 | - **`/bin` is a VFS path alias.** User paths whose first component is | ||
| 52 | `bin` are rewritten (in `fs::resolve`) to the first mounted volume | ||
| 53 | whose root has `\bin` — so `ls /bin/cli`, `cat /bin/cli/x.efi` and a | ||
| 54 | binary's own `fs_resolve("/bin/cli/x.efi")` work without knowing the | ||
| 55 | volume UID. The alias is transparent: it creates no node (`ls /` does | ||
| 56 | not list `bin`), and without a system volume mounted `/bin` does not | ||
| 57 | exist. It covers `/bin` only — the rest of root-path unification | ||
| 58 | stays deferred, but the bind/alias machinery it needed now exists. | ||
| 51 | - **Kind = launch surface.** `/bin/cli` holds programs that run inside a | 59 | - **Kind = launch surface.** `/bin/cli` holds programs that run inside a |
| 52 | terminal session; `/bin/gui` holds programs launchable with no terminal | 60 | terminal session; `/bin/gui` holds programs launchable with no terminal |
| 53 | (they own their windows). A future launcher enumerates `/bin/gui`. | 61 | (they own their windows). A future launcher enumerates `/bin/gui`. |
| @@ -91,7 +99,9 @@ and so a launcher can enumerate launchable apps by listing a directory. | |||
| 91 | through FAT write-back persists across reboots, and the image doubles | 99 | through FAT write-back persists across reboots, and the image doubles |
| 92 | as the distribution artifact. | 100 | as the distribution artifact. |
| 93 | - **Boot-volume identity / root-path unification** (`\etc` visible at | 101 | - **Boot-volume identity / root-path unification** (`\etc` visible at |
| 94 | `/etc`) — deferred; needs VFS bind/alias machinery. | 102 | `/etc`) — deferred; needed VFS bind/alias machinery. The `/bin` half |
| 103 | landed as a path alias (see the resolution-rule section); `\etc`, | ||
| 104 | `\bzImage` etc. at the root stay deferred. | ||
| 95 | - **A third "TUI" binary kind for rsdosedit** — rejected; `edit` is | 105 | - **A third "TUI" binary kind for rsdosedit** — rejected; `edit` is |
| 96 | classified CLI (it lives in a terminal session) and migrates only after | 106 | classified CLI (it lives in a terminal session) and migrates only after |
| 97 | the CLI ABI grows raw-mode surface access. Until then it stays a | 107 | the CLI ABI grows raw-mode surface access. Until then it stays a |
