]> xenbits.xensource.com Git - people/julieng/freebsd.git/commitdiff
Remove legacy CHS geometry from dmesg and unify capacity outputs.
authormav <mav@FreeBSD.org>
Sun, 11 Oct 2015 13:48:20 +0000 (13:48 +0000)
committermav <mav@FreeBSD.org>
Sun, 11 Oct 2015 13:48:20 +0000 (13:48 +0000)
sys/cam/ata/ata_da.c
sys/cam/scsi/scsi_cd.c
sys/cam/scsi/scsi_da.c

index e9c63f2599c4c88b470e0040cd08c72b275b90ea..1ecc7fd7b0b80634605a9ba2561159d30772a0ea 100644 (file)
@@ -1345,12 +1345,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);
 
index 1dc5f8050841acecd25785741d09d24abb60450e..7490b552263b3935a988922c0016d5c0a6ffc400 100644 (file)
@@ -1081,11 +1081,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) {
                                /*
index 3ebbb713c00167eda6aed45ac2261cadc82e1127..c96b7acf385f48c5c9fe7f9e7cb7f832ca9a866e 100644 (file)
@@ -3149,13 +3149,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;