On 6/28/07, Roman Shaposhnik <[EMAIL PROTECTED]> wrote:
Now I'm *completely* confused. ;-) So it seems that we have 4
choices: lib9client (part of Plan9 from userspace), npfs, spfs
and now libixp. Are they completely different? Under which
circumstances does each make the most sense?
if you are on unix and don't *ever* intend to go to plan 9, reduce to
npfs, spfs, ixp
if you don't need threads, reduce to spfs, ixp
libspfs lets you do stuff like this (from xbootfs)
static void
fsinit(void)
{
Spfile *file;
root = spfile_alloc(NULL, "", 0555 | Dmdir, Qroot, &root_ops, NULL);
root->parent = root;
spfile_incref(root);
root->atime = root->mtime = time(NULL);
root->uid = root->muid = user;
root->gid = user->dfltgroup;
create_file(root, "ctl", 0644, Qctl, &ctl_ops, NULL, NULL);
datafile = create_file(root, "data", 0444, Qdata, &data_ops,
NULL, NULL);
datafile->length = filelen;
create_file(root, "avail", 0666, Qavail, &avail_ops, NULL, NULL);
file = create_file(root, "redir", 0444, Qredir, &redir_ops, NULL, NULL);
/* make it too long, it matters not ... */
file->length = 32;
}
if you don't need stuff like that, use libixp
or, if you want to read a nice, tight implementation of 9p in c, just
get libixp anyway. It's neat.
ron