shithub: 9pro

Download patch

ref: 5409aae3e7195e5f71ec001bc1e4bf69d12ac08f
parent: 92f0726ae3f4bd8bbec8ff934d823e323f5a201f
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Thu Feb 23 18:57:04 EST 2023

always set iounit to 0; trace msize

--- a/9pex.c
+++ b/9pex.c
@@ -258,7 +258,7 @@
 	   (fmt == S_IFCHR || fmt == S_IFCHR || fmt == S_IFSOCK || fmt == S_IFIFO))
 		qid->type |= C9qtappend;
 	if(iounit != NULL)
-		*iounit = st->st_blksize;
+		*iounit = 0;
 }
 
 static Fid *
@@ -805,9 +805,9 @@
 	}else{
 		switch(t->type){
 		case Tversion:
-			trace("\n");
+			trace(" msize=%d\n", t->version.msize);
 			if(s9do(s9version(c), &err) == 0)
-				trace("<- Rversion\n");
+				trace("<- Rversion msize=%d\n", c->msize);
 			break;
 		case Tauth:
 			trace(" afid=%d uname=\"%s\" aname=\"%s\"\n",
--- a/c9/c9.c
+++ b/c9/c9.c
@@ -1118,6 +1118,7 @@
 		if(msize < c->msize)
 			c->msize = msize;
 		c->svflags |= Svver;
+		t.version.msize = msize;
 		c->t(c, &t);
 		break;
 
--- a/c9/c9.h
+++ b/c9/c9.h
@@ -211,6 +211,11 @@
 	{
 		struct
 		{
+			int msize;
+		}version;
+
+		struct
+		{
 			char *uname;
 			char *aname;
 			C9fid afid;