code: mafs

Download patch

ref: b3ccded71dc0330ba63fdb7d7a0e6fc6ded1657e
parent: 0eaaca26f45b08793aa46003391bb78299911659
author: 9ferno <gophone2015@gmail.com>
date: Mon Nov 7 12:58:51 EST 2022

remove old code fragment

--- a/9p.c
+++ b/9p.c
@@ -261,30 +261,6 @@
 		return;
 	}
 
-	if((req->fid->qid.type & QTDIR) != 0){
-		/* some directory, find the child at offset */
-		d = searchdir(((Aux*)req->fid->aux)->dblkno, req->fid->qid.path,
-						((Aux*)req->fid->aux)->uid, nil,
-						((Aux*)req->fid->aux)->dri, &dbuf, &cbuf);
-		if(d == nil){
-			req->ofcall.offset = req->ifcall.offset;
-			req->ofcall.count = 0;
-			((Aux*)req->fid->aux)->dri = 0;
-			respond(req, nil);
-			return;
-		}
-		fsmkdir(d, &dir, nbuf);
-		req->ofcall.count = n = convD2M(&dir, (u8*)req->ofcall.data, req->ifcall.count);
-		req->ofcall.offset = req->ifcall.offset+n;
-		if(n == 0)
-			((Aux*)req->fid->aux)->dri = 0;
-		else
-			((Aux*)req->fid->aux)->dri++;
-		freesearchstate(&dbuf, &cbuf);
-		respond(req, nil);
-		return;
-	}
-
 	n = readfile(((Aux*)req->fid->aux)->dblkno, req->fid->qid.path,
 				 req->ofcall.data, req->ifcall.count, req->ifcall.offset);
 	req->ofcall.count = n;