apmd "cool" mode was removed in 2014, and -C was made an undocumented
compat alias for -A ("auto").

The code still contains kinda misleading references to this "cool"
running mode, the diff below zaps those.  ok?


Index: apm/apm.c
===================================================================
RCS file: /d/cvs/src/usr.sbin/apm/apm.c,v
retrieving revision 1.36
diff -u -p -r1.36 apm.c
--- apm/apm.c   28 Jun 2019 13:32:46 -0000      1.36
+++ apm/apm.c   20 Sep 2020 12:24:43 -0000
@@ -185,14 +185,10 @@ main(int argc, char *argv[])
                        action = HIBERNATE;
                        break;
                case 'A':
-                       if (action != NONE)
-                               usage();
-                       action = SETPERF_AUTO;
-                       break;
                case 'C':
                        if (action != NONE)
                                usage();
-                       action = SETPERF_COOL;
+                       action = SETPERF_AUTO;
                        break;
                case 'H':
                        if (action != NONE)
@@ -277,7 +273,6 @@ main(int argc, char *argv[])
        case SETPERF_LOW:
        case SETPERF_HIGH:
        case SETPERF_AUTO:
-       case SETPERF_COOL:
                if (fd == -1)
                        errx(1, "cannot connect to apmd, "
                            "not changing performance adjustment mode");
Index: apmd/apm-proto.h
===================================================================
RCS file: /d/cvs/src/usr.sbin/apmd/apm-proto.h,v
retrieving revision 1.9
diff -u -p -r1.9 apm-proto.h
--- apmd/apm-proto.h    26 Mar 2012 20:17:45 -0000      1.9
+++ apmd/apm-proto.h    20 Sep 2020 12:28:01 -0000
@@ -38,7 +38,6 @@ enum apm_action {
        SETPERF_LOW,
        SETPERF_HIGH,
        SETPERF_AUTO,
-       SETPERF_COOL
 };
 
 enum apm_state {
@@ -52,7 +51,6 @@ enum apm_perfmode {
        PERF_NONE = -1,
        PERF_MANUAL,
        PERF_AUTO,
-       PERF_COOL
 };
 
 struct apm_command {
Index: apmd/apmd.c
===================================================================
RCS file: /d/cvs/src/usr.sbin/apmd/apmd.c,v
retrieving revision 1.96
diff -u -p -r1.96 apmd.c
--- apmd/apmd.c 13 Mar 2020 09:08:58 -0000      1.96
+++ apmd/apmd.c 20 Sep 2020 12:25:53 -0000
@@ -302,7 +302,6 @@ handle_client(int sock_fd, int ctl_fd)
                setperfpolicy("high");
                break;
        case SETPERF_AUTO:
-       case SETPERF_COOL:
                doperf = PERF_AUTO;
                reply.newstate = NORMAL;
                logmsg(LOG_NOTICE, "setting hw.perfpolicy to auto");
Index: apmd/apmsubr.c
===================================================================
RCS file: /d/cvs/src/usr.sbin/apmd/apmsubr.c,v
retrieving revision 1.8
diff -u -p -r1.8 apmsubr.c
--- apmd/apmsubr.c      15 Mar 2006 20:30:28 -0000      1.8
+++ apmd/apmsubr.c      20 Sep 2020 12:28:49 -0000
@@ -79,8 +79,6 @@ perf_mode(int mode)
                return "manual";
        case PERF_AUTO:
                return "auto";
-       case PERF_COOL:
-               return "cool running";
        default:
                return "invalid";
        }




-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to