aboutsummaryrefslogtreecommitdiff
path: root/sbin/camcontrol/epc.c
diff options
context:
space:
mode:
authorAndriy Gapon <avg@FreeBSD.org>2022-01-11 13:41:38 +0000
committerAndriy Gapon <avg@FreeBSD.org>2022-01-11 13:41:38 +0000
commit75bc7150f4b87e14da13e2e96da9cdf59a5723cf (patch)
tree2395c4f592ef0181cd97e92ca5c9a9a4e3711b42 /sbin/camcontrol/epc.c
parent7e8ed296e120a57211d377102fa27dd9411d0fbd (diff)
downloadsrc-75bc7150f4b87e14da13e2e96da9cdf59a5723cf.tar.gz
src-75bc7150f4b87e14da13e2e96da9cdf59a5723cf.zip
add and use defintions for ATA power modes
Those can be returned by CHECK POWER MODE command (0xe5). Note that some of the definitions duplicate definitions for Extended Power Conditions. MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D33646
Diffstat (limited to 'sbin/camcontrol/epc.c')
-rw-r--r--sbin/camcontrol/epc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/camcontrol/epc.c b/sbin/camcontrol/epc.c
index f96ca6e68ba9..aac94ccaa4e5 100644
--- a/sbin/camcontrol/epc.c
+++ b/sbin/camcontrol/epc.c
@@ -475,18 +475,18 @@ check_power_mode:
|| (ident->enabled2 & ATA_ENABLED_EPC)) {
if (mode_name != NULL)
printf("%s", mode_name);
- else if (count == 0xff) {
+ else if (count == ATA_PM_ACTIVE_IDLE) {
printf("PM0:Active or PM1:Idle");
}
} else {
switch (count) {
- case 0x00:
+ case ATA_PM_STANDBY:
printf("PM2:Standby");
break;
- case 0x80:
+ case ATA_PM_IDLE:
printf("PM1:Idle");
break;
- case 0xff:
+ case ATA_PM_ACTIVE_IDLE:
printf("PM0:Active or PM1:Idle");
break;
}