Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Oct 2015 13:48:21 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r289138 - in head/sys/cam: ata scsi
Message-ID:  <201510111348.t9BDmLWJ050199@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Sun Oct 11 13:48:20 2015
New Revision: 289138
URL: https://svnweb.freebsd.org/changeset/base/289138

Log:
  Remove legacy CHS geometry from dmesg and unify capacity outputs.

Modified:
  head/sys/cam/ata/ata_da.c
  head/sys/cam/scsi/scsi_cd.c
  head/sys/cam/scsi/scsi_da.c

Modified: head/sys/cam/ata/ata_da.c
==============================================================================
--- head/sys/cam/ata/ata_da.c	Sun Oct 11 13:01:51 2015	(r289137)
+++ head/sys/cam/ata/ata_da.c	Sun Oct 11 13:48:20 2015	(r289138)
@@ -1345,12 +1345,9 @@ adaregister(struct cam_periph *periph, v
 
 	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);
 

Modified: head/sys/cam/scsi/scsi_cd.c
==============================================================================
--- head/sys/cam/scsi/scsi_cd.c	Sun Oct 11 13:01:51 2015	(r289137)
+++ head/sys/cam/scsi/scsi_cd.c	Sun Oct 11 13:48:20 2015	(r289138)
@@ -1081,11 +1081,11 @@ cddone(struct cam_periph *periph, union 
 		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) {
 				/*

Modified: head/sys/cam/scsi/scsi_da.c
==============================================================================
--- head/sys/cam/scsi/scsi_da.c	Sun Oct 11 13:01:51 2015	(r289137)
+++ head/sys/cam/scsi/scsi_da.c	Sun Oct 11 13:48:20 2015	(r289138)
@@ -3149,13 +3149,10 @@ dadone(struct cam_periph *periph, union 
 				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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201510111348.t9BDmLWJ050199>