diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2020-03-07 20:06:55 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2020-03-07 20:06:55 +0100 |
commit | e1cdcfdb172071bafef18b1ac160138c97459b79 (patch) | |
tree | c203ebb30f9c9d997af0e7cda3d0da72897a47ef /acme/bin/source/win/fs.c | |
parent | 022087cdcdd39e7904f6970b54152f4aa30fc071 (diff) | |
download | plan9front-e1cdcfdb172071bafef18b1ac160138c97459b79.tar.xz |
acme: split win into winfs and rc script, get rid of lib9p leavefdsopen hack
split the acme win command into a winfs fileserver which
handles /dev/cons emulation and a rc script responsible
for launching the command.
with these changes, the fd fiddling is not neccesary anymore
and we can get rid of the leavefdsopen hack.
Diffstat (limited to 'acme/bin/source/win/fs.c')
-rw-r--r-- | acme/bin/source/win/fs.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/acme/bin/source/win/fs.c b/acme/bin/source/win/fs.c index 9f2efe06e..473171e63 100644 --- a/acme/bin/source/win/fs.c +++ b/acme/bin/source/win/fs.c @@ -163,17 +163,24 @@ fsdestroyfid(Fid *fid) free(fid->aux); } +void +fsstart(Srv *srv) +{ + proccreate(fsloop, srv->aux, STACK); +} + Srv fs = { .read= fsread, .write= fswrite, .flush= fsflush, .destroyfid= fsdestroyfid, -.leavefdsopen= 1, +.start = fsstart, }; void -mountcons(void) +mountcons(void *arg) { + fs.aux = arg; fschan = chancreate(sizeof(Fsevent), 0); writechan = chancreate(sizeof(void*), 0); fs.tree = alloctree("win", "win", DMDIR|0555, nil); |