SchOS/kernel
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Nexoniarz 67db42b460 vfs: names up to 255 bytes and paths up to 4096, like Linux
Every path component was copied into a DIRSIZ buffer and every path
into a MAXPATH one, so names were cut at 29 bytes and paths at 127
without an error. Two names sharing their first 29 bytes opened the
same file, on SchFS and FAT alike, though both hold 255.

VFS_NAME_MAX (255) and VFS_PATH_MAX (4096) are the limits now, and
anything longer is ENAMETOOLONG. namex_from() takes its path buffers
from kalloc(), a page each, rather than putting two of them on an 8 KB
kernel stack. The v1 format still stores DIRSIZ bytes, and refuses a
longer name instead of matching on its first 30.

Checked: 255-byte names on SchFS and FAT (fsck.fat clean, and the FAT
name answers to its uppercase form), 256 refused, a 200-byte path and a
link to it, and no pages lost over 700 lookups through links.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S1giNvrHTrPMPw7V6x1kQ4
2026-10-23 11:17:28 +02:00
..
acpi fat: FAT12, FAT16 and FAT32 with long names, read and write 2026-10-23 09:33:35 +02:00
arch/x86_64 gfx: draw the console in RAM, and write it to the card write-combined 2026-10-22 23:46:58 +02:00
core dev: read /dev/zero and /dev/urandom from them, not from the keyboard 2026-10-23 09:33:08 +02:00
dev schfs: do not read a block off the disk just to overwrite it 2026-10-23 11:02:44 +02:00
drivers acpi, vga: say what the first real boot actually found 2026-10-22 23:47:17 +02:00
fs vfs: names up to 255 bytes and paths up to 4096, like Linux 2026-10-23 11:17:28 +02:00
net licence: SchOS is GPL-2.0-or-later, no longer Apache-2.0 2026-10-22 08:48:45 +02:00
proc storage: AHCI, GPT/MBR partitions, and a disk a PC can boot 2026-10-22 10:57:41 +02:00
sys vfs: names up to 255 bytes and paths up to 4096, like Linux 2026-10-23 11:17:28 +02:00
kernel.ld debugger: the kernel can be asked a question 2026-09-14 00:58:45 +02:00