shithub: gefs

Download patch

ref: 93b53d81984032ba86acff73c220c59c40fe9ffe
parent: 5ec83af8f7363c4ad8587a5aa492996dbaf7ce23
author: glenda <glenda@9front.local>
date: Sun Oct 3 02:50:06 EDT 2021

cons: improve output

--- a/fs.c
+++ b/fs.c
@@ -787,7 +787,6 @@
 			s->overflow = 1;
 			break;
 		}
-		fprint(2, "*** nscan: %d\n", ns);
 		p += ns;
 		n -= ns;
 	}
@@ -1132,12 +1131,19 @@
 		if(narg == 0 || strlen(arg[0]) == 0)
 			continue;
 		if(strcmp(arg[0], "show") == 0){
-			if(narg == 0)
+			switch(narg){
+			case 1:
 				fshowfs(fd, "show");
-			if(narg == 2 && strcmp(arg[1], "fid") == 0)
-				showfids(fd);
-			else
-				fprint(fd, "show me yours first");
+				break;
+			case 2:
+				if(strcmp(arg[1], "fid") == 0){
+					showfids(fd);
+					break;
+				}
+				/* wet floor */
+			default:
+				fprint(fd, "show me yours first\n");
+			}
 		}else if(strcmp(arg[0], "check") == 0)
 			checkfs();
 		else if(strcmp(arg[0], "dbg") && narg == 2)
--- a/tree.c
+++ b/tree.c
@@ -1287,7 +1287,6 @@
 	case Oinsert:
 		s->present = 1;
 		kv2dir(m, d);
-		fprint(2, "name: %s\n", d->name);
 		break;
 	case Odelete:
 		s->present = 0;