Hello Plan9People!

I finally stumbled across Richard Miller's Raspberry Pi image a while back and managed to install it on an RPi, and have been learning more about it. I've used the 9P protocol for a couple of projects, but haven't actually used Plan 9 itself until now...


So far I've patched my installation in a couple of small ways, which has been a useful exercise to get started with:

I think the v6fs support in tapefs has a bug: the last line of doread() should be
return buf+off;
rather than
return buf;
This only shows up if your reads are unaligned with block boundaries. I think v32fs.c has the same bug, but it's okay in v10fs.c.
I realise the number of people who care about this may be very small. :)


I also made a fix to exportfs.c:reply() so it works with the Linux v9fs on my other RPi, which was otherwise pretty much not working for me (???!): I got error 526 which is ESERVERFAULT - untranslatable error, which should supposedly not leak through into Linux user space, but does...
It seems there's a mismatch between the error strings that the plan 9 kernel produces and the ones that v9fs knows how to deal with, as exportfs just passes them along:
Plan 9 produces:
'foo' does not exist
in /sys/src/9/port/chan.c:namelenerror()
v9fs apparently currently expects:
file does not exist
or
file not found
in github/torvalds/linux/net/9p/error.c:p9_errstr2errno()
What I have replaces the 'nice' error string with what v9fs expects. It's not a great fix, but I'm not sure what (or where?) the fix *should* be??
I see the same problem between Ubuntu and 9front as I do between RPi Debian and Rpi Plan 9, so this seems to be a general problem. Without this fix, I couldn't actually create a file on a Plan 9 export from Linux via v9fs. It's not just a weird error message.


Currently I'm trying to build a 'drawterm' server for my experimental OS - so far I can run the clock program on Plan 9 and have it display on my window system (not the catclock - that one gives me the creeps!). I also have bitmaps and text beginning to work, but there's not enough there to run sam or rio yet.

I'm having trouble with bind-mounting my 9p server on Plan 9's /dev, though: the old /dev files are all there, but when I bind -b over it from /n only the files in the directory I'm binding show up in ls! It's like the -b is being ignored by bind(1), but if I ls /dev/null (for example) it's actually there - but after the bind I can no longer see it when I ls /dev! Very odd.
This is not actually blocking me at the moment, but if anyone has any clues about what I might be doing wrong it would save me a lot of hair-pulling?