Anonymous avatar Anonymous committed a88222a

VOP_READ working again

Comments (0)

Files changed (2)

 	struct vop_read_args *ap;
 	struct vnode *vp;
 	struct uio *uio;
-	struct o9fsfid *f;
+	struct o9fid *f;
 	struct o9fs *fs;
-	int ioflag, error, msize;
-	char *buf;
-	long n;
+	uint32_t n;
 	int64_t len;
 
 	ap = v;
 	vp = ap->a_vp;
 	uio = ap->a_uio;
-	ioflag = ap->a_ioflag;
-	f = VTO9(vp);
+	f = VTO92(vp);
 	fs = VFSTOO9FS(vp->v_mount);
-	error = 0;
 
 	if (uio->uio_offset < 0)
 		return EINVAL;
 		return 0;
 
 	len = uio->uio_resid;
-	msize = fs->msize - O9FS_IOHDRSZ;
-	if (len > msize)
-		len = msize;
-	buf = malloc(len, M_O9FS, M_WAITOK | M_ZERO);
-	n = o9fs_rdwr(fs, O9FS_TREAD, f, buf, 1024, uio->uio_offset);
+	n = o9fs_rdwr2(fs, f, O9FS_TREAD, len, uio->uio_offset);
 	if (n > 0)
-		error = uiomove(fs->reply.data, n, uio);
-	else if (n < 0)
-		error = n;
-
-	free(buf, M_O9FS);
-	return error;
+		return uiomove(fs->inbuf + Minhd + 4, n, uio);
+	return n;
 }
 
 static long
 	struct o9fsstat *stat;
 	struct dirent d;
 	u_char *buf, *nbuf;
-	long n, ts;
+	uint32_t n, ts;
 	int error, i;
 	int64_t len;
 	DIN();
 	try ls $mtpt/net
 }
 
+rdirlong() {
+	echo Reading directory
+	try ls -l $mtpt/net
+}
+
+
+
 rdir
+rdirlong
 exit 0
 	
 readdir="ls -l $mtpt"
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.