diff options
Diffstat (limited to 'tools/serial.zig')
| -rw-r--r-- | tools/serial.zig | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tools/serial.zig b/tools/serial.zig index da225fd..3398a11 100644 --- a/tools/serial.zig +++ b/tools/serial.zig @@ -26,6 +26,27 @@ pub const Baud = enum(u32) { } }; +/// The remedy for the one error every first run hits, in the module that owns port opening so the +/// build steps and `p4-console` cannot drift apart. Deliberately says nothing about the port's +/// path: the caller names that on its own first line, which is the only part that differs. +/// +/// The last case is the one worth spelling out, because it is the one that looks like the fix did +/// not work: a shell started before `usermod` never sees the new group, since credentials are +/// captured at login and not re-read. +pub const access_denied_help = + \\ It is owned by a group your session is not in (uucp on Arch, dialout on Debian). + \\ + \\ If you are NOT in that group yet, join it and log in again: + \\ sudo usermod -aG uucp $USER + \\ + \\ If `id -nG` already lists it, this shell simply predates the change - group membership is + \\ captured at login. Either log out and back in, or take it in this shell: + \\ newgrp uucp + \\ + \\ Or run one command with the group, without touching this shell at all: + \\ sg uucp -c '...' +; + /// `struct termios2` as the Linux kernel defines it: 19 control characters, then the two integer /// baud fields. std's `linux.termios2` uses NCCS = 32, which makes it 60 bytes instead of 44 and /// therefore encodes TCGETS2/TCSETS2 with the wrong size field - the ioctl then fails with ENOTTY. |
