git: 9front

Download patch

ref: 7f7b6f411263b92d9165a199ad409a98d33ddc51
parent: 30e4e3f5824f38f8014ab45326b2da379055d204
author: Ori Bernstein <ori@eigenstate.org>
date: Tue Apr 18 12:15:52 EDT 2023

bio: abort on invalid state

--- a/sys/src/libbio/bseek.c
+++ b/sys/src/libbio/bseek.c
@@ -9,9 +9,7 @@
 
 	switch(bp->state) {
 	default:
-		fprint(2, "Bseek: unknown state %d\n", bp->state);
-		return Beof;
-
+		abort();
 	case Bracteof:
 		bp->state = Bractive;
 		bp->icount = 0;
--