Module Name:    src
Committed By:   jakllsch
Date:           Wed Mar  5 00:41:01 UTC 2025

Modified Files:
        src/sys/dev/scsipi: sd.c

Log Message:
sd(4): print physical sector information


To generate a diff of this commit:
cvs rdiff -u -r1.342 -r1.343 src/sys/dev/scsipi/sd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/scsipi/sd.c
diff -u src/sys/dev/scsipi/sd.c:1.342 src/sys/dev/scsipi/sd.c:1.343
--- src/sys/dev/scsipi/sd.c:1.342	Sun Mar  2 14:13:22 2025
+++ src/sys/dev/scsipi/sd.c	Wed Mar  5 00:41:00 2025
@@ -1,4 +1,4 @@
-/*	$NetBSD: sd.c,v 1.342 2025/03/02 14:13:22 riastradh Exp $	*/
+/*	$NetBSD: sd.c,v 1.343 2025/03/05 00:41:00 jakllsch Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2003, 2004 The NetBSD Foundation, Inc.
@@ -48,7 +48,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.342 2025/03/02 14:13:22 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.343 2025/03/05 00:41:00 jakllsch Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_scsi.h"
@@ -341,6 +341,14 @@ sdattach(device_t parent, device_t self,
 		    " x %llu sectors",
 		    pbuf, dp->cyls, dp->heads, dp->sectors, dp->blksize,
 		    (unsigned long long)dp->disksize);
+		if (dp->lbppbe) {
+			aprint_normal(" (%lu bytes/physsect", dp->blksize <<
+			    dp->lbppbe);
+			if (dp->lalba)
+				aprint_normal("; first aligned sector %u",
+				    dp->lalba);
+			aprint_normal(")");
+		}
 		break;
 
 	case SDGP_RESULT_OFFLINE:

Reply via email to