<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gbos.git/c/mkdir.c, branch master</title>
<subtitle>gbos - a tiny Unix-flavored OS for the Game Boy Color (kernel, shell, coreutils in C, RAM filesystem)</subtitle>
<id>https://git.sl0p.foo/gbos.git/atom/c/mkdir.c?h=master</id>
<link rel='self' href='https://git.sl0p.foo/gbos.git/atom/c/mkdir.c?h=master'/>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/gbos.git/'/>
<updated>2026-07-17T22:38:38Z</updated>
<entry>
<title>refactor: c/ -&gt; usr/, compiled program blobs out of the source tree</title>
<updated>2026-07-17T22:38:38Z</updated>
<author>
<name>user</name>
<email>user@clank</email>
</author>
<published>2026-07-17T22:38:38Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/gbos.git/commit/?id=ba2d7ae1d7b319645b10aaa31a7f664f9f80c25c'/>
<id>urn:sha1:ba2d7ae1d7b319645b10aaa31a7f664f9f80c25c</id>
<content type='text'>
Userland sources live in usr/ (fits the Unix theme better than 'c').
SDCC output .bin blobs land in build/usr/ with the other build artifacts
instead of littering the source dir; programs.asm INCBINs them from there.
Byte-identical ROM.
</content>
</entry>
<entry>
<title>fs rewrite stage 3: nested directories, paths, cwd (cd/mkdir/ls)</title>
<updated>2026-07-16T10:49:19Z</updated>
<author>
<name>user</name>
<email>user@clank</email>
</author>
<published>2026-07-16T10:49:19Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/gbos.git/commit/?id=5fefd233769a56caefdb2ffecaa9fb8b9ec6db86'/>
<id>urn:sha1:5fefd233769a56caefdb2ffecaa9fb8b9ec6db86</id>
<content type='text'>
- directories generalized: dir_find/dir_add/dir_remove take any dir inode;
  every dir carries '.'/'..'. Path resolution (resolve / resolve_parent) walks
  absolute or cwd-relative paths; open/mkdir/chdir/remove/opendir take paths.
- per-process cwd: PROC_CWD in the PCB (root by default, inherited on fork);
  sys_chdir sets it, sys_opendir points ls at any directory.
- shell: 'cd' builtin + cwd-aware prompt; 'mkdir'/'ls &lt;dir&gt;' tools; 'exit'/'quit'
  and EOF call poweroff() (clean shutdown via the $ED opcode -&gt; reliable save).
- three HL/buffer-clobber bugs fixed along the way: resolve didn't preserve the
  path cursor across dir_find; cur_cwd clobbered HL; resolve_parent set the final
  name before resolve() overwrote wFsNameBuf (now copied after).
- verified: nested mkdir/cd/save, multi-level paths (cat docs/sub/b), and the
  whole tree persists across a reboot.
- README: document directories + the poweroff opcode.
</content>
</entry>
</feed>
