ref: ff1f02c31615450c31163df752fcab74567ad322
parent: 5a3aea0ca8fc8ec5529a5328e6f7879ad6d976da
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Wed Sep 7 15:43:43 EDT 2022
aux/acpi: mount -a on /dev instead of /mnt/pm; ctl → pmctl
--- a/sys/man/8/acpi
+++ b/sys/man/8/acpi
@@ -19,7 +19,7 @@
presents at
.I mountpoint
(default
-.BR /mnt/pm )
+.BR /dev )
an interface to the ACPI. If a
.I service
is specified, the interface will be
@@ -48,9 +48,9 @@
.B cputemp
Each line provides a current temperature reading of a specific CPU.
.TP
-.B ctl
+.B pmctl
The
-.B ctl
+.B pmctl
file currently does not provide any functionality.
.SH SOURCE
.B /sys/src/cmd/aux/acpi.c
--- a/sys/src/cmd/aux/acpi.c
+++ b/sys/src/cmd/aux/acpi.c
@@ -61,7 +61,7 @@
Qroot = 0,
Qbattery,
Qcputemp,
- Qctl,
+ Qpmctl,
Qdisable = (uvlong)-1,
};
@@ -80,10 +80,10 @@
Req *rlist, **tailp;
Dfile dfile[] = {
- {{Qroot,0,QTDIR}, "/", DMDIR|0555, rootread, nil},
+ {{Qroot,0,QTDIR}, "/", DMDIR|0555, rootread, nil},
{{Qbattery}, "battery", 0444, batteryread, nil},
- {{Qcputemp}, "cputemp", 0444, tmpread, nil},
- {{Qctl}, "ctl", 0666, ctlread, ctlwrite},
+ {{Qcputemp}, "cputemp", 0444, tmpread, nil},
+ {{Qpmctl}, "pmctl", 0666, ctlread, ctlwrite},
};
static char*
@@ -382,7 +382,7 @@
}
break;
- case Qctl:
+ case Qpmctl:
if((r->ifcall.mode & ~(OTRUNC|OREAD|OWRITE|ORDWR)) == 0){
respond(r, nil);
return;
@@ -456,7 +456,7 @@
static void
usage(void)
{
- fprint(2, "usage: aux/acpi [-Dp] [-m /mnt/pm] [-s service]\n");
+ fprint(2, "usage: aux/acpi [-Dp] [-m mountpoint] [-s service]\n");
exits("usage");
}
@@ -481,7 +481,7 @@
Tbl *t;
int fd, n, l;
- mtpt = "/mnt/pm";
+ mtpt = "/dev";
srv = nil;
ARGBEGIN{
case 'D':
@@ -549,7 +549,7 @@
if(ntherms < 1)
dfile[Qcputemp].qid.path = Qdisable;
- threadpostmountsrv(&fs, srv, mtpt, MREPL);
+ threadpostmountsrv(&fs, srv, mtpt, MAFTER);
threadexits(nil);
fail: