Commits

Anonymous committed 0cbb503

Minor stuff

Comments (0)

Files changed (3)

 struct o9stat {
 	uint16_t	type;			/* server type */
 	uint32_t	dev;			/* server subtype */
-	struct		o9qid qid;	/* unique id from server */
+	struct		o9qid qid;		/* unique id from server */
 	uint32_t	mode;			/* permissions */
 	uint32_t	atime;			/* last read time */
 	uint32_t	mtime;			/* last write time */
 	Offtag	= 5,
 
 	Minhd	= Offtag + 2,		/* Minimum 9P header size, independent of message type */
-	Maxhd	= 23,						/* Maximum 9P header size */
+	Maxhd	= 23,				/* Maximum 9P header size */
 };
 
 struct o9fs {
 {
 	long n, nstat;
 	struct o9stat *stat;
+	u_char *p;
+	uint16_t sn;
 	DIN();
 
 	if (fid == NULL) {
 	stat->length = O9FS_GBIT64(fs->inbuf + Minhd + 2 + 2 + 2 + 4 + 1 + 4 + 8 + 4 + 4 + 4);
 
 	/* For now the other fields are not used, so we don't bother parsing them */
-
+/*
+	p = fs->inbuf + Minhd + 2 + 2 + 2 + 4 + 1 + 4 + 8 + 4 + 4 + 4 + 8;
+	stat->name = o9fs_getstr(p, &sn);
+	p += sn+2;
+	stat->uid = o9fs_getstr(p, &sn);
+	p += sn+2;
+	stat->gid = o9fs_getstr(p, &sn);
+	p += sn+2;
+	stat->muid = o9fs_getstr(p, &sn);
+	DBG("name %s uid %s gid %s muid %s\n", stat->name, stat->uid, stat->gid, stat->muid);
+*/
 	DRET();
 	return stat;
 }
 char *
 o9fs_getstr(char *buf)
 {
-	long n;
+	uint16_t n;
 	char *s;
 
 	if (buf == NULL)