Anonymous avatar Anonymous committed d72e9ed

Cleanup

Comments (0)

Files changed (3)

mount/mount_o9fs.c

 
 #include "o9fs.h"
 
-/*#include "mntopts.h"
-
-const struct mntopt opts[] = {
-	MOPT_STDOPTS,
-	{ NULL }
-};*/
-
 __dead void
 usage(void)
 {
 	int ch, flags;
 
 	flags = 0;
-
-	while ((ch = getopt(argc, argv, "o:")) != -1);
-	/*	switch (ch) {
-		case 'o':
-			getmntopts(optarg, opts, &flags);
-			break;
-		default:
-			usage();
-		}*/
-
 	argc -= optind;
 	argv += optind;
 
 	}\
 }while(0)
 
-#define nelem(a) (sizeof(a) / sizeof(*a))
-
 struct o9fsqid {
 	uint8_t		type;
 	uint32_t	vers;
 	char		*muid;			/* last modifier name */
 };
 
-/* 9p file */
-struct o9fsfid {
-	int	fid;
-	int	mode;				/* open mode */
-	int	opened;
-//	int ref;				/* reference count */
-	struct o9fsqid qid;
-	int64_t	offset;
-	struct	o9fsfid *next;
-};
-
 /*
  * Many vnodes can refer to the same o9fid and this is accounted for in ref.
  * When ref drops to zero, the o9fid is clunked.
 #define	O9FS_VERSION9P	"9P2000"
 #define	O9FS_MAXWELEM	16
 
-struct o9fsfcall
-{
-	u_char			type;
-	uint32_t		fid;
-	u_short			tag;
-	uint32_t		msize;		/* Tversion, Rversion */
-	char			*version;	/* Tversion, Rversion */
-
-	u_short			oldtag;		/* Tflush */
-
-	char			*ename;		/* Rerror */
-
-	struct o9fsqid	qid;		/* Rattach, Ropen, Rcreate */
-	uint32_t		iounit;		/* Ropen, Rcreate */
-	struct o9fsqid	aqid;		/* Rauth */
-	uint32_t		afid;		/* Tauth, Tattach */
-	char			*uname;		/* Tauth, Tattach */
-	char			*aname;		/* Tauth, Tattach */
-	uint32_t		perm;		/* Tcreate */ 
-	char			*name;		/* Tcreate */
-	u_char			mode;		/* Tcreate, Topen */
-	uint32_t		newfid;		/* Twalk */
-	u_short			nwname;		/* Twalk */
-	char			*wname[O9FS_MAXWELEM];	/* Twalk */
-	u_short			nwqid;		/* Rwalk */
-	struct o9fsqid	wqid[O9FS_MAXWELEM];	/* Rwalk */
-	int64_t			offset;				/* Tread, Twrite */
-	uint32_t		count;				/* Tread, Twrite, Rread */
-	char			*data;				/* Twrite, Rread */
-	u_short			nstat;				/* Twstat, Rstat */
-	u_char			*stat;				/* Twstat, Rstat */
-};
-
 enum {
 	Offtype	= 4,
 	Offtag	= 5,
 	struct	file *servfp;		/* File pointing to the server */
 	long	msize;				/* Maximum size of our payload */
 	
-	struct o9fsfcall	request;	/* request we are doing */
-	struct o9fsfcall	reply;		/* reply we received */
-	u_char	*rpc;
-
 	/* 
      * Buffers for I/O
 	 * Both buffers have the client requested msize,
 	TAILQ_HEAD(, o9fid)	activeq;
 	TAILQ_HEAD(, o9fid) freeq;
 	int	nextfid;
-
-	struct	o9fsfid *freefid;
 };
 
-/* o9fs session */
-/*struct o9fsmount {
-	struct	mount *om_mp;		/* generic mount info */
-	struct	vnode *om_root;		/* local root of the tree */
-	struct	o9fs om_o9fs;		/* 9P info */
-	struct	file *om_fp;
-
 
 /* O9FS_STATFIXLEN includes leading 16-bit count */
 /* The count, however, excludes itself; total size is O9FS_BIT16SZ+count */
 
 /* o9fs_9p.c */
 uint32_t	o9fs_rdwr2(struct o9fs *, struct o9fid *, uint8_t, uint32_t, uint64_t);
-void	o9fs_fidclunk(struct o9fs *, struct o9fsfid *);
-struct	o9fsfid *o9fs_twalk(struct o9fs *, struct o9fsfid *, struct o9fsfid *, char *);
-int		o9fs_opencreate(int, struct o9fs *, struct o9fsfid *, int, ulong, char *);
 int		o9fs_opencreate2(struct o9fs *, struct o9fid *, uint8_t, uint8_t, uint32_t, char *);
 struct	o9fid *o9fs_walk(struct o9fs *, struct o9fid *, struct o9fid *, char *);
 void	o9fs_clunk(struct o9fs *, struct o9fid *);
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.