shithub: mq

Download patch

ref: 2d6c8ab83106892e1215dd0c94d9f24d6525a3fc
parent: a5f17344ac7a6d07c80266add86394a7b705b91f
author: Ori Bernstein <ori@eigenstate.org>
date: Mon Mar 4 16:21:37 EST 2024

stat: set all fields on all mesages

--- a/mq.c
+++ b/mq.c
@@ -239,17 +239,18 @@
 	vlong p;
 
 	p = r->fid->qid.path;
+	r->d.uid = estrdup9p("glenda");
+	r->d.gid = estrdup9p("glenda");
+	r->d.muid = estrdup9p("glenda");
+	r->d.qid = r->fid->qid;
+	r->d.mtime = 0;
+	r->d.atime = 0;
 	switch(QTYPE(p)){
 	case Qroot:
-		r->d.uid = estrdup9p("glenda");
-		r->d.gid = estrdup9p("glenda");
-		r->d.muid = estrdup9p("glenda");
-		r->d.qid = r->fid->qid;
-		r->d.mtime = 0;
-		r->d.atime = 0;
 		r->d.mode = DMDIR|0755;
 		break;
 	default:
+		r->d.mode = 0644;
 		incref(queues[QIDX(p)]);
 		qstat(&r->d, queues[QIDX(p)]);
 		decref(queues[QIDX(p)]);