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

This commit is contained in:
cinap_lenrek 2020-03-08 13:13:25 +01:00
parent 5826140ce3
commit 57741d473f

View file

@ -81,7 +81,7 @@ rtsched(void)
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 @@ boost(void)
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);
}