History

sync with Plan 9

Russ Cox committed 20 years ago

Commit a85fefc1 parent bf7b4c41 file · +2 −3Browse files

Unified · Split

kern/devmnt.c+2−3
@@ -196,7 +196,8 @@ mntversion(Chan *c, char *version, int msize, int returnlen) · 195 unmodified lines
196 error("server tries to increase msize in fversion");196 error("server tries to increase msize in fversion");
197 if(f.msize<256 || f.msize>1024*1024)197 if(f.msize<256 || f.msize>1024*1024)
198 error("nonsense value of msize in fversion");198 error("nonsense value of msize in fversion");
199 if(strncmp(f.version, v, strlen(f.version)) != 0)199 k = strlen(f.version);
200 if(strncmp(f.version, v, k) != 0)
200 error("bad 9P version returned from server");201 error("bad 9P version returned from server");
201 202
202 /* now build Mnt associated with this connection */203 /* now build Mnt associated with this connection */
@@ -220,7 +221,6 @@ mntversion(Chan *c, char *version, int msize, int returnlen) · 17 unmodified lines
220 m->msize = f.msize;221 m->msize = f.msize;
221 unlock(&mntalloc.lk);222 unlock(&mntalloc.lk);
222 223
223 k = strlen(f.version);
224 if(returnlen > 0){224 if(returnlen > 0){
225 if(returnlen < k)225 if(returnlen < k)
226 error(Eshort);226 error(Eshort);
@@ -242,7 +242,6 @@ mntversion(Chan *c, char *version, int msize, int returnlen) · 15 unmodified lines
242 poperror(); /* c */242 poperror(); /* c */
243 qunlock(&c->umqlock);243 qunlock(&c->umqlock);
244 244
245 free(msg);
246 return k;245 return k;
247}246}
248 247

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t