Skip to content
This repository has been archived by the owner on Mar 31, 2021. It is now read-only.

Added support for "-o" and "-f" options #2

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*.o
*.o
9pfs
66 changes: 33 additions & 33 deletions 9p.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,34 +18,34 @@
#include "util.h"

char *calls2str[] = {
[Tversion] "Tversion",
[Tauth] "Tauth",
[Tattach] "Tattach",
[Terror] "Terror",
[Tflush] "Tflush",
[Twalk] "Twalk",
[Topen] "Topen",
[Tcreate] "Tcreate",
[Tread] "Tread",
[Twrite] "Twrite",
[Tclunk] "Tclunk",
[Tremove] "Tremove",
[Tstat] "Tstat",
[Twstat] "Twstat",
[Rversion] "Rversion",
[Rauth] "Rauth",
[Rattach] "Rattach",
[Rerror] "Rerror",
[Rflush] "Rflush",
[Rwalk] "Rwalk",
[Ropen] "Ropen",
[Rcreate] "Rcreate",
[Rread] "Rread",
[Rwrite] "Rwrite",
[Rclunk] "Rclunk",
[Rremove] "Rremove",
[Rstat] "Rstat",
[Rwstat] "Rwstat"
[Tversion]= "Tversion",
[Tauth]= "Tauth",
[Tattach]= "Tattach",
[Terror]= "Terror",
[Tflush]= "Tflush",
[Twalk]= "Twalk",
[Topen]= "Topen",
[Tcreate]= "Tcreate",
[Tread]= "Tread",
[Twrite]= "Twrite",
[Tclunk]= "Tclunk",
[Tremove]= "Tremove",
[Tstat]= "Tstat",
[Twstat]= "Twstat",
[Rversion]= "Rversion",
[Rauth]= "Rauth",
[Rattach]= "Rattach",
[Rerror]= "Rerror",
[Rflush]= "Rflush",
[Rwalk]= "Rwalk",
[Ropen]= "Ropen",
[Rcreate]= "Rcreate",
[Rread]= "Rread",
[Rwrite]= "Rwrite",
[Rclunk]= "Rclunk",
[Rremove]= "Rremove",
[Rstat]= "Rstat",
[Rwstat]= "Rwstat"
};

void *tbuf, *rbuf;
Expand Down Expand Up @@ -105,7 +105,7 @@ do9p(Fcall *t, Fcall *r)
r->type = Rerror;
return -1;
}

int
_9pversion(u32int m)
{
Expand Down Expand Up @@ -165,7 +165,7 @@ _9pattach(u32int fid, u32int afid, char* uname, char *aname)
f->fid = fid;
f->qid = rattach.qid;
return f;
}
}

FFid*
_9pwalkr(FFid *r, char *path)
Expand Down Expand Up @@ -262,7 +262,7 @@ int
_9popen(FFid *f)
{
Fcall topen, ropen;

topen.type = Topen;
topen.fid = f->fid;
topen.mode = f->mode;
Expand Down Expand Up @@ -489,7 +489,7 @@ uniqfid(void)
while((f = lookupfid(fid, PUT)) == NULL);
return f;
}


FFid*
lookupfid(u32int fid, int act)
Expand Down Expand Up @@ -522,7 +522,7 @@ lookupfid(u32int fid, int act)
f = FDEL;
break;
}
return f;
return f;
}

FFid*
Expand Down
13 changes: 8 additions & 5 deletions 9pfs.1
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,14 @@ The default is 564.
.It Fl u Ar user
Specifies the username to use on authentication
and attach to the 9P service.
.It Fl d
Causes debug information for subsequent FUSE library calls to be
output to stderr. Implies -f.
.It Fl f
This flag indicates that the file system should not detach from the
controlling terminal and run in the foreground.
.It Fl o Ar option
Passes additional option to fuse_mount(3).
.El
.Pp
9pfs caches directories it reads which will cause
Expand Down Expand Up @@ -97,11 +105,6 @@ and
are from Russ Cox's
.Lk https://swtch.com/plan9port/ plan9port
.Sh BUGS
Files of 0 reported size are not read correctly under Linux. This
prevents 9pfs from mounting a useful factotum. For a
work-around, use 9pfuse to mount factotum and then proceed with
9pfs authentication as usual.
.Pp
OpenBSD does not display all the files in a very large
directory.
.Pp
Expand Down
Loading