Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[9fans] webfs on p9p

0 views
Skip to first unread message

Paul Lalonde

unread,
Nov 13, 2005, 11:45:36 PM11/13/05
to
Call me a masochist, but in a fit of writing much too much code this
weekend, I thought I'd have a poke at porting webfs to p9p; after
all, we can't let only native plan9 people benefit from abaco :-)
I haven't had a working plan9 box since my shuttle died, so I'm
wondering if I have a bug or if I just don't understand webfs.
Overall it's looking good: the synthetic file system shows up in my
namespace, I can make a new connection, but I can't seem to write a
uri to it using 9p:
% echo 'url http://slashdot.org/' | 9p write webfs/0/ctl
9: write error: parseurl: newline in URI

So I ditch the newline put on by echo:
% echo 'url http://slashdot.org/' | 9p write webfs/0/ctl
% 9p read webfs/0/ctl
0
acceptcookies on
sendcookies on
redirectlimit 10
useragent webfs/2.0 (plan 9)
%

No URL. Am I sending it wrong? Or do I have to find where the file
server is hooped?

Paul

Nils O. Selåsdal

unread,
Nov 14, 2005, 2:42:40 AM11/14/05
to

It'd probably be a nice feature if webfs ignored slashdot.org. However
you probably must hold on to references to the webfs files.
"A connection is assumed closed once all files in its directory have been closed,
and is then will be reallocated."

Under Plan 9 , if you're seated in /mnt/web/, it'd be e.g.:
{ dir=`{read} ; echo -n 'url http://slashdot.org/' >$dir/ctl ; cat
$dir/body }<>clone

--
Nils O. Selåsdal <N...@Utel.no>

Paul Lalonde

unread,
Nov 14, 2005, 12:45:16 PM11/14/05
to
Thanks,
that did it (although I had to write a pile of C goop to do it)!
Looks like I have a working port of webfs. Now to finish up abaco...

Paul

Russ Cox

unread,
Nov 14, 2005, 2:39:47 PM11/14/05
to
On 11/14/05, Paul Lalonde <plal...@telus.net> wrote:
> Thanks,
> that did it (although I had to write a pile of C goop to do it)!
> Looks like I have a working port of webfs. Now to finish up abaco...

/sys/src/cmd/webfsget.c

Russ

Paul Lalonde

unread,
Nov 14, 2005, 3:31:29 PM11/14/05
to
Ported.

webfs needs a little clean-up, it's still complaining:
9pserve: annouce unix!/tmp/ns.5r2H/web: Address already in use
o.webfs: post9pservice web: 9pserve failed

I'm sure it's something trivial I missed in the port.

Paul

0 new messages