Well I had a go at this on my RPi. I altered libc.a to arrange that errstr() 
removes the error string filename decoration, but print ("%r") doesn't, and 
wrapped the open() call (as an example) to do its own error string decoration 
and hand that back to the kernel.

Unfortunately I then looked in the kernel and discovered that namec (which does 
the decorating) is called in about 50 places. If it stopped decorating error 
strings, there are potentially a lot of places that would notice, and I haven't 
chased them all down.  That being so, my enthusiasm for this idea is much 
dampened, and I think it's dipped below the worth-considering threshold. :(
I'll keep the code I wrote around in case it's ever useful. On the plus side, I 
learned some things about the libc.a build process. And the awesome mkfile in 
/sys/src/libc/9syscall.

I think it would still be worth fixing exportfs to strip off any decoration 
before sending out an error string via Rerror, though, as that would fix v9fs's 
problem and the nested mounts problem I was looking at earlier.

------------------------------------------
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/Tbc78d29ab04652a2-Mb935ad65e7512b2d0a6787a8
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

Reply via email to