shithub: riscv

Download patch

ref: 57741d473f9d5165d142b165bd837984f6428c66
parent: 5826140ce394025d21ab8d2b2c21c12720e88a59
author: cinap_lenrek <[email protected]>
date: Sun Mar 8 09:13:25 EDT 2020

games/playlistfs: open /proc/n/ctl OWRITE, not ORDWR

--- a/sys/src/games/music/playlistfs/player.c
+++ b/sys/src/games/music/playlistfs/player.c
@@ -81,7 +81,7 @@
 	char *ctl;
 
 	ctl = smprint("/proc/%ud/ctl", getpid());
-	if((fd = open(ctl, ORDWR)) < 0) 
+	if((fd = open(ctl, OWRITE)) < 0) 
 		sysfatal("%s: %r", ctl);
 	if(fprint(fd, "period 20ms") < 0)
 		sysfatal("%s: %r", ctl);
@@ -102,7 +102,7 @@
 	char *ctl;
 
 	ctl = smprint("/proc/%ud/ctl", getpid());
-	if((fd = open(ctl, ORDWR)) >= 0) {
+	if((fd = open(ctl, OWRITE)) >= 0) {
 		fprint(fd, "pri 13");
 		close(fd);
 	}