code: drawterm

Download patch

ref: 3c6be4750088503e4387a3b3b4910354c89913ed
parent: 5876605b6b41632fcf67dbc7de11aa07a78a4382
author: Sigrid <ftrvxmtrx@gmail.com>
date: Wed Dec 4 09:01:14 EST 2019

sndio: a better fix - just call error()

--- a/kern/devaudio-sndio.c
+++ b/kern/devaudio-sndio.c
@@ -21,8 +21,10 @@
 audiodevopen(void)
 {
 	hdl = sio_open(NULL, SIO_PLAY, 0);
-	if(hdl == NULL)
+	if(hdl == NULL){
+		error("sio_open failed");
 		return;
+	}
 
 	sio_initpar(&par);
 
@@ -33,6 +35,7 @@
 
 	if(!sio_setpar(hdl, &par) || !sio_start(hdl)){
 		sio_close(hdl);
+		error("sio_setpar/sio_start failed");
 		return;
 	}
 }
@@ -40,8 +43,7 @@
 void
 audiodevclose(void)
 {
-	if (hdl != NULL)
-		sio_close(hdl);
+	sio_close(hdl);
 }
 
 void