code: 9ferno

Download patch

ref: f38ffb2e9b569b388bfa44d08eab369509359ab7
parent: d2ddb4edfec6500aa3e59e0517e9cc46eb146310
author: 9ferno <gophone2015@gmail.com>
date: Fri Sep 10 07:58:41 EDT 2021

kfs64 allow wstat on directories

--- a/appl/cmd/disk/kfs64.b
+++ b/appl/cmd/disk/kfs64.b
@@ -14,6 +14,7 @@
 #	using hwblock to represent the highest touched block number
 #		to avoid reaming all the free space at once
 #		only ream some more blocks after hwblock, when we need space
+#	allow wstat on directories
 
 include "sys.m";
 	sys: Sys;
@@ -1955,10 +1956,11 @@
 		mode := DMDIR;
 	else
 		mode = 0;
-	if((dir.mode^mode) & DMDIR){
-		d.put();
-		return ferr(f, Enotd, file, p1);
-	}
+# allow wstat on directories. Why not?
+#	if((dir.mode^mode) & DMDIR){
+#		d.put();
+#		return ferr(f, Enotd, file, p1);
+#	}
 
 	if(dir.mtime == ~0)
 		dir.mtime = d.mtime;