summaryrefslogtreecommitdiffstats
path: root/sys/cam
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2015-11-30 21:23:30 +0000
committermav <mav@FreeBSD.org>2015-11-30 21:23:30 +0000
commit15f2886919e644334022bc748e92133c58587795 (patch)
treed35e76cc921899a8a29cb0cc6c851d5a6163dfdd /sys/cam
parent1430c69ae59435c6f85be8d41f49677f007a3d4d (diff)
downloadFreeBSD-src-15f2886919e644334022bc748e92133c58587795.zip
FreeBSD-src-15f2886919e644334022bc748e92133c58587795.tar.gz
MFC r289138: Remove legacy CHS geometry from dmesg and unify capacity outputs.
Diffstat (limited to 'sys/cam')
-rw-r--r--sys/cam/ata/ata_da.c9
-rw-r--r--sys/cam/scsi/scsi_cd.c8
-rw-r--r--sys/cam/scsi/scsi_da.c11
3 files changed, 11 insertions, 17 deletions
diff --git a/sys/cam/ata/ata_da.c b/sys/cam/ata/ata_da.c
index 11260e1..f88899e 100644
--- a/sys/cam/ata/ata_da.c
+++ b/sys/cam/ata/ata_da.c
@@ -1370,12 +1370,9 @@ adaregister(struct cam_periph *periph, void *arg)
dp = &softc->params;
snprintf(announce_buf, sizeof(announce_buf),
- "%juMB (%ju %u byte sectors: %dH %dS/T %dC)",
- (uintmax_t)(((uintmax_t)dp->secsize *
- dp->sectors) / (1024*1024)),
- (uintmax_t)dp->sectors,
- dp->secsize, dp->heads,
- dp->secs_per_track, dp->cylinders);
+ "%juMB (%ju %u byte sectors)",
+ ((uintmax_t)dp->secsize * dp->sectors) / (1024 * 1024),
+ (uintmax_t)dp->sectors, dp->secsize);
xpt_announce_periph(periph, announce_buf);
xpt_announce_quirks(periph, softc->quirks, ADA_Q_BIT_STRING);
if (legacy_id >= 0)
diff --git a/sys/cam/scsi/scsi_cd.c b/sys/cam/scsi/scsi_cd.c
index 16acd6d..55def6a 100644
--- a/sys/cam/scsi/scsi_cd.c
+++ b/sys/cam/scsi/scsi_cd.c
@@ -1084,11 +1084,11 @@ cddone(struct cam_periph *periph, union ccb *done_ccb)
if ((csio->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP ||
(error = cderror(done_ccb, CAM_RETRY_SELTO,
SF_RETRY_UA | SF_NO_PRINT)) == 0) {
-
snprintf(announce_buf, sizeof(announce_buf),
- "cd present [%lu x %lu byte records]",
- cdp->disksize, (u_long)cdp->blksize);
-
+ "%juMB (%ju %u byte sectors)",
+ ((uintmax_t)cdp->disksize * cdp->blksize) /
+ (1024 * 1024),
+ (uintmax_t)cdp->disksize, cdp->blksize);
} else {
if (error == ERESTART) {
/*
diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c
index 53579ce..4e3fe76 100644
--- a/sys/cam/scsi/scsi_da.c
+++ b/sys/cam/scsi/scsi_da.c
@@ -3156,13 +3156,10 @@ dadone(struct cam_periph *periph, union ccb *done_ccb)
lbp = (lalba & SRC16_LBPME_A);
dp = &softc->params;
snprintf(announce_buf, sizeof(announce_buf),
- "%juMB (%ju %u byte sectors: %dH %dS/T "
- "%dC)", (uintmax_t)
- (((uintmax_t)dp->secsize *
- dp->sectors) / (1024*1024)),
- (uintmax_t)dp->sectors,
- dp->secsize, dp->heads,
- dp->secs_per_track, dp->cylinders);
+ "%juMB (%ju %u byte sectors)",
+ ((uintmax_t)dp->secsize * dp->sectors) /
+ (1024 * 1024),
+ (uintmax_t)dp->sectors, dp->secsize);
}
} else {
int error;
OpenPOWER on IntegriCloud