shithub: riscv

Download patch

ref: 56970a285fcc90b4c0418b0653ff7fcae377d7c7
parent: 4d901d1e4165085cda5b574b44e1cc51be50abf8
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;