shithub: 9pro

Download patch

ref: 729c41d076c2a7788ed303994fa30d31d68c31a8
parent: 51a3863bf5a500ae466ea29bed10615bc12f0ad0
author: Sigrid Haflínudóttir <ftrvxmtrx@gmail.com>
date: Mon Dec 23 08:52:22 EST 2019

more verbose traces for Rread and Ropen

--- a/9pex.c
+++ b/9pex.c
@@ -568,7 +568,7 @@
 		}
 		if (s9do(s9read(c, tag, p, n), err) != 0)
 			return -1;
-		trace("<- Rread tag=%d count=%zd ...\n", tag, n);
+		trace("<- Rread tag=%d count=%zd data=...\n", tag, n);
 		return 0;
 	}
 
@@ -609,7 +609,7 @@
 	i = num;
 	if (s9do(s9readdir(c, tag, c9stp, &num, &f->diroffset, size), err) != 0)
 		return -1;
-	trace("<- Rread tag=%d ...\n", tag);
+	trace("<- Rread tag=%d count=%"PRIu64" data=...\n", tag, f->diroffset - offset);
 	if (i != num)
 		seekdir(f->dir, dirpos[num]);
 
@@ -676,7 +676,7 @@
 				else if (t->open.mode != C9read && (f->qid.type & C9qtdir) != 0)
 					err = Eisdir;
 				else if (openfid(f, t->open.mode, &err) == 0 && s9do(s9open(c, t->tag, &f->qid, f->iounit), &err) == 0)
-					trace("<- Ropen tag=%d iounit=%d ...\n", t->tag, f->iounit);
+					trace("<- Ropen tag=%d qid=[path=%"PRIu64" type=0x%02x version=%"PRIu32"] iounit=%d\n", t->tag, f->qid.path, f->qid.type, f->qid.version, f->iounit);
 			}
 			break;
 		case Tcreate: