shithub: front

Download patch

ref: fb782398bfec11a5b6d2b9eba3ba51d353708646
parent: 3f95d092329fea3430c4309312ad137648e25ae9
author: Ori Bernstein <ori@eigenstate.org>
date: Tue Jul 1 22:58:41 EDT 2025

gefs: only error() after waserror

we were erroring in sync(), but the enclosing scope
might not have a corresponding waserror(). Just return
in this case, we'd already have logged an error.

--- a/sys/src/cmd/gefs/fs.c
+++ b/sys/src/cmd/gefs/fs.c
@@ -89,10 +89,11 @@
 	int i;
 
 	if(agetl(&fs->rdonly))
-		error(Erdonly);
+		return;
 	qlock(&fs->synclk);
 	if(waserror()){
 		fprint(2, "failed to sync: %s\n", errmsg());
+		aincl(&fs->rdonly, 1);
 		qunlock(&fs->synclk);
 		nexterror();
 	}
--