summaryrefslogtreecommitdiff
path: root/sys/src/cmd/aux/acpi.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2022-12-18 22:26:54 +0000
committercinap_lenrek <cinap_lenrek@felloff.net>2022-12-18 22:26:54 +0000
commit1d748edeaf62b2e919db1d2d5f0066dd529ea5fa (patch)
treecacc00419b9f904edbc07602da6ff25e063d61f8 /sys/src/cmd/aux/acpi.c
parentbcde2519e2031396fef161416d66695861c3527f (diff)
scram, aux/acpi: open /proc/$pid/ctl instead of #p/$pid/ctl for wirecpu0()
Diffstat (limited to 'sys/src/cmd/aux/acpi.c')
-rw-r--r--sys/src/cmd/aux/acpi.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/src/cmd/aux/acpi.c b/sys/src/cmd/aux/acpi.c
index 62e33122a..dc362cfc6 100644
--- a/sys/src/cmd/aux/acpi.c
+++ b/sys/src/cmd/aux/acpi.c
@@ -248,15 +248,12 @@ tmpread(char *s, char *e)
static void
wirecpu0(void)
{
- char buf[128];
+ char buf[32];
int ctl;
snprint(buf, sizeof(buf), "/proc/%d/ctl", getpid());
- if((ctl = open(buf, OWRITE)) < 0){
- snprint(buf, sizeof(buf), "#p/%d/ctl", getpid());
- if((ctl = open(buf, OWRITE)) < 0)
- return;
- }
+ if((ctl = open(buf, OWRITE)) < 0)
+ return;
write(ctl, "wired 0", 7);
close(ctl);
}