diff options
author | Alexander Motin <mav@FreeBSD.org> | 2009-09-22 22:17:14 +0000 |
---|---|---|
committer | Alexander Motin <mav@FreeBSD.org> | 2009-09-22 22:17:14 +0000 |
commit | a3f00c8abfb92d52f081936e51bea38d1b5d54cd (patch) | |
tree | 3ec5687c52680039d79a857b473c2e9a66346f20 /sbin | |
parent | bacfa53de3f8d654cf7f53c63640aa0120c4c82c (diff) | |
download | src-test2-a3f00c8abfb92d52f081936e51bea38d1b5d54cd.tar.gz src-test2-a3f00c8abfb92d52f081936e51bea38d1b5d54cd.zip |
Notes
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/camcontrol/camcontrol.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/sbin/camcontrol/camcontrol.c b/sbin/camcontrol/camcontrol.c index 1bba49cfbcde..7da0200e8291 100644 --- a/sbin/camcontrol/camcontrol.c +++ b/sbin/camcontrol/camcontrol.c @@ -1055,23 +1055,22 @@ atacapprint(struct ata_params *parm) printf("\n"); printf("PIO supported PIO"); - if (parm->atavalid & ATA_FLAG_64_70) { - if (parm->apiomodes & 0x02) - printf("4"); - else if (parm->apiomodes & 0x01) - printf("3"); - } else if (parm->mwdmamodes & 0x04) + switch (ata_max_pmode(parm)) { + case ATA_PIO4: printf("4"); - else if (parm->mwdmamodes & 0x02) + break; + case ATA_PIO3: printf("3"); - else if (parm->mwdmamodes & 0x01) + break; + case ATA_PIO2: printf("2"); - else if ((parm->retired_piomode & ATA_RETIRED_PIO_MASK) == 0x200) - printf("2"); - else if ((parm->retired_piomode & ATA_RETIRED_PIO_MASK) == 0x100) + break; + case ATA_PIO1: printf("1"); - else + break; + default: printf("0"); + } printf("\n"); printf("DMA%ssupported ", |