SchOS/kernel
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Nexoniarz 1754cbf1aa console: a bare ESC[m is a reset, and OSC sequences are consumed
Two ANSI bugs, both found by running fastfetch rather than by reading the
parser, and both invisible to anything that spells its escapes out in full.

ESC[m with no parameters means ESC[0m. ECMA-48 is explicit that an omitted
parameter takes its default and SGR's default is 0, and sgr() iterated its
parameter list -- which is empty in exactly that case, so the loop body never
ran and the reset was silently dropped.

Programs emit the bare form constantly. fastfetch writes "\x1b[32m1%\x1b[m", so
everything after the first coloured character stayed green forever. With a
background colour it is much worse: its palette swatch sets a white background
and resets, the reset did nothing, and the console went white-on-white and
stayed there -- filling the screen with white rectangles as it scrolled, which
looks like a corrupted framebuffer rather than one missing branch.

OSC sequences were not a state at all, so ESC ] fell through and the payload
printed as text: a hyperlinked path arrived as "Disk (]8;;file:///\]8;;\)".
Nothing here acts on an operating-system command -- there is no window title and
no hyperlink to follow -- but *discarding* one is not optional, because the
alternative is printing somebody's URL into the middle of their output. ESC \
ends it, and an ESC followed by anything else is handed back to the escape state
rather than eaten, so a malformed OSC does not swallow the sequence after it.

Verified by screendumping the framebuffer after two consecutive fastfetch runs:
identical output both times, near-white coverage down from most of the screen to
2% (the palette swatch's own white cell), and the disk line reading "Disk (/)".

Also installs docs/branding/Ascii/ascii_50.txt as /usr/share/schos/logo.txt --
Shift as characters, at the width that leaves room for an info block on an
80-column console. Installed from the branding directory rather than copied into
sysroot by hand, so there is one source.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VQ7Qx8E1q1M1bbCq8QLHS2
2026-09-12 19:38:00 +02:00
..
arch/x86_64 docs: four directories, and a rule for when a thing leaves the roadmap 2026-09-12 17:13:35 +02:00
core console: a bare ESC[m is a reset, and OSC sequences are consumed 2026-09-12 19:38:00 +02:00
dev fs: timestamps come from the clock, and /proc/fsstat says how full the tables are 2026-09-12 17:14:14 +02:00
drivers net: a frame wakes the stack, instead of waiting for the clock 2026-09-12 17:23:46 +02:00
fs schfs: the allocation map can be given back, so unmount stops leaking it 2026-09-12 17:49:57 +02:00
net net: AF_NETLINK, so getifaddrs() works for everything and not just one program 2026-09-12 19:23:34 +02:00
proc docs: four directories, and a rule for when a thing leaves the roadmap 2026-09-12 17:13:35 +02:00
sys net: AF_NETLINK, so getifaddrs() works for everything and not just one program 2026-09-12 19:23:34 +02:00
kernel.ld Initial commit: Schunix as it stands before the SchOS rename 2026-08-09 13:47:01 +02:00