diff options
author | sos <sos@FreeBSD.org> | 2002-03-30 16:36:41 +0000 |
---|---|---|
committer | sos <sos@FreeBSD.org> | 2002-03-30 16:36:41 +0000 |
commit | 65dd7ee2d664fd3e803c25710ebb8cff700d4693 (patch) | |
tree | 9eb58c78c6a73f6a83116f480d13036d52b41301 /sbin/atacontrol/atacontrol.c | |
parent | 59fa66220ea04959e377ec1831047b655bbe4da6 (diff) | |
download | FreeBSD-src-65dd7ee2d664fd3e803c25710ebb8cff700d4693.zip FreeBSD-src-65dd7ee2d664fd3e803c25710ebb8cff700d4693.tar.gz |
Add support for getting status (fan, temp, 5V and 12V levels) from
Promise Superswap enclosures.
Sponsored by: Advanis
Diffstat (limited to 'sbin/atacontrol/atacontrol.c')
-rw-r--r-- | sbin/atacontrol/atacontrol.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sbin/atacontrol/atacontrol.c b/sbin/atacontrol/atacontrol.c index e339a25..9fe2201 100644 --- a/sbin/atacontrol/atacontrol.c +++ b/sbin/atacontrol/atacontrol.c @@ -272,6 +272,17 @@ main(int argc, char **argv) else if (!strcmp(argv[1], "cap") && argc == 4) { ata_cap_print(fd, iocmd.channel, atoi(argv[3])); } + else if (!strcmp(argv[1], "enclosure") && argc == 4) { + iocmd.device = atoi(argv[3]); + iocmd.cmd = ATAENCSTAT; + if (ioctl(fd, IOCATA, &iocmd) < 0) + err(1, "ioctl(ATAENCSTAT)"); + printf("fan RPM: %d temp: %.1f 5V: %.2f 12V: %.2f\n", + iocmd.u.enclosure.fan, + (double)iocmd.u.enclosure.temp / 10, + (double)iocmd.u.enclosure.v05 / 1000, + (double)iocmd.u.enclosure.v12 / 1000); + } else if (!strcmp(argv[1], "detach") && argc == 3) { iocmd.cmd = ATADETACH; if (ioctl(fd, IOCATA, &iocmd) < 0) |