summaryrefslogtreecommitdiff
path: root/sys/src/cmd/rio/fsys.c
AgeCommit message (Collapse)Author
2022-09-11rio: add 'none' attach option to wsysJacob Moody
This allows users to mount wsys without having a valid window or creating a new one. In this mode wsys only servs 'global' files, those that apply to all windows. Providing this mount to riostart's namespace gives us two things: * Allows kbdtap programs(ktrans) to run in riostart * Obsoletes $wctl and the associated named pipe by providing /dev/wctl in riostart As such, the wctl pipe and environment variable are removed as well.
2022-08-19rio: correct tap codeJacob Moody
Remove tapmesg, allow the reads to accept flushes, accept writes of multiple messages, move open/close to Xfid code.
2022-08-15rio: add /dev/kbdtapJacob Moody
2020-12-07rio: simplify filsysinit() by using getuser(), format pid's as ulongscinap_lenrek
2020-08-01pre-lib9p servers: fix incorrect Tversion handlingkvik
version(5) says: If the server does not understand the client's version string, it should respond with an Rversion message (not Rerror) with the version string the 7 characters ``unknown''. Pre-lib9p file servers -- all except cwfs(4) -- do return Rerror. lib9p(2) follows the above spec, although ignoring the next part concerning comparison after period-stripping. It assumes an Fcall.version starting with "9P" is correctly formed and returns the only supported version of the protocol, which seems alright. This patch brings pre-lib9p servers in accordance with the spec.
2020-05-02make bind(2) error handling consistentcinap_lenrek
The mount() and bind() syscalls return -1 on error, and the mountid sequence number on success. The manpage states that the mountid sequence number is a positive integer, but the kernels implementation currently uses a unsigned 32-bit integer and does not guarantee that the mountid will not become negative. Most code just cares about the error, so test for the -1 error value only.
2017-05-07rio: implement writable and truncatable /dev/textcinap_lenrek
2016-11-17cmd: remove a bit of unused stuffftrvxmtrx
2016-07-24make error handling in 9p service loops consistentcinap_lenrek
when we get eof, stop the loop immidiately and do not rely on the read to eventually return an error. when convM2S() fails to decode the message, error out and stop the loop. there is no point in continuing.
2015-11-23rio: stop serving kbdin file (thanks eekee)cinap_lenrek
kbdfs already provides a /dev/kbdin file for the system, rio does not need to provide one for the onscreen keyboard anymore.
2014-10-25rio: dont serve a kbd file per window when we didnt got one from the environmentcinap_lenrek
9vx doesnt provide a /dev/kbd file and rio faking one up causes problems with vncv. (issue #223)
2013-11-03rio: cleanup and error handlingcinap_lenrek
2013-11-02rio: huge simplification of flush handlingcinap_lenrek
xfidflush() now uses a simpler way to flush another xfid. when we can send to Xfid.c channel, we know that the xfid is completed. so all xfidflush() needs todo is to do an alt sending to both Xfid.c and Xfid.flushc. once the send to Xfid.c succeeds, we know the xfid is gone and we can respond to the flush request. theres no need to keep track of flush state anymore. so Xfid.active and Xfid.flushing can be removed. note, that it is ok to respond normally to a currently flushed request.
2013-11-01rio: enforce flush reply ordering for all xfidscinap_lenrek
flushing isnt optional for concurrently handled requests. we need to ensure that Rflush is replied *after* the origianl request. so we assign the flushtag for *every* xfid in xfidctl(), and filsysrespond() checks if the xfid was flushed *after* replying and wakes up the flushing xfid.
2013-11-01rio: properly handle follow up flushes (fixes unexpected reply tag)cinap_lenrek
when multiple flushes are send, they need to be replied in order. we ensure this by having the flush xfid taking over the flushtag (synchronized with a new fs->csyncflush channel) so the next flush will flush the previous flush.
2013-08-05rio: make sure flush replies are send only *after* the request got flushed ↵cinap_lenrek
or was replied due to the xfid handlers clearing flushtag too early, xfidflush might respond too early causing spurious replies send later by the handler. now, we clear the flushtag in filsysrespond *after* the reply was send. xfidflush will wait for us on the active qlock.
2013-06-16make filesystem handling of read9pmsg() consistentcinap_lenrek
2012-10-21rio: various fixescinap_lenrek
use notefd in killprocs() insead of postnote() as the process might'v exited. the notefd stays valid even if the particular process it was originaly opend on exited. remove the Window.pid field as its not needed. dup() the notefd for interruptproc as the window might'v gone away and closed the notefd file descriptor, resulting in us writing to the wrong thing. use snprint() instead of sprint() for safety. fix bogus debug fprint(). add missing "visible" flushimage() after Reshaped winctl message got handled. i assumed wsetname()/nameimage() would be enough, it but does a invisible flush so softscreen doesnt get updated immidiately. do not make allocimage() failure in scrtemps() fatal. it wont draw the window properly, but it gives the user a chance to delete some windows to recover.
2012-05-08rio: dont list files we dont serve when reading directorycinap_lenrek
2011-11-29rio: dont serve /dev/screen from display->image, as its not updated on ↵cinap_lenrek
resize. instead, use screen and omit the file if provided by the enviroment. allow unaligned reads.
2011-05-11add /dev/kbd support to riocinap_lenrek
2011-03-30Import sources from 2011-03-30 iso image - libTaru Karttunen
2011-03-30Import sources from 2011-03-30 iso imageTaru Karttunen