shithub: gefs

Download patch

ref: fa848c5023115801abfed9634d1b465e155f5c59
parent: 4f1090a10d585fabda5c0bed6881c8d680b6955b
author: Ori Bernstein <ori@eigenstate.org>
date: Tue Jan 2 02:03:48 EST 2024

main: make flags match docs, remove useless/old ones.

--- a/main.c
+++ b/main.c
@@ -19,7 +19,6 @@
 int	permissive;
 int	usereserve;
 char	*reamuser;
-int	notrace;
 char	*dev;
 vlong	tracesz		= 16*MiB;
 vlong	cachesz 	= 512*MiB;
@@ -161,7 +160,7 @@
 	if((fs = mallocz(sizeof(Gefs), 1)) == nil)
 		sysfatal("malloc: %r");
 
-	if(!notrace){
+	if(tracesz != 0){
 		fs->trace = emalloc(tracesz, 1);
 		fs->tracesz = tracesz/sizeof(Trace);
 	}
@@ -273,13 +272,12 @@
 void
 main(int argc, char **argv)
 {
-	int i, srvfd, ctlfd, nann, check;
+	int i, srvfd, ctlfd, nann;
 	char *s, *e, *ann[16];
 	vlong v, memsz;
 	Conn *c;
 
 	nann = 0;
-	check = 0;
 	memsz = memsize();
 	cachesz = 25*memsz/100;
 	ARGBEGIN{
@@ -333,12 +331,6 @@
 	case 'f':
 		dev = EARGF(usage());
 		break;
-	case 'C':
-		check = 1;
-		break;
-	case 'T':
-		notrace=1;
-		break;
 	default:
 		usage();
 		break;
@@ -393,8 +385,6 @@
 	rfork(RFNOTEG);
 	nokill();
 	loadfs(dev);
-	if(check && !checkfs(2))
-		sysfatal("fishy");
 	fs->wrchan = mkchan(32);
 	fs->admchan = mkchan(32);
 	fs->nsyncers = nproc/2;