svn commit: r342471 - stable/11/sys/cam/scsi

Andriy Gapon avg at FreeBSD.org
Wed Dec 26 09:19:14 UTC 2018


Author: avg
Date: Wed Dec 26 09:19:13 2018
New Revision: 342471
URL: https://svnweb.freebsd.org/changeset/base/342471

Log:
  MFC r341681: daprobedone: announce if a disk is write-protected

Modified:
  stable/11/sys/cam/scsi/scsi_da.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/cam/scsi/scsi_da.c
==============================================================================
--- stable/11/sys/cam/scsi/scsi_da.c	Wed Dec 26 09:16:03 2018	(r342470)
+++ stable/11/sys/cam/scsi/scsi_da.c	Wed Dec 26 09:19:13 2018	(r342471)
@@ -2263,6 +2263,11 @@ daprobedone(struct cam_periph *periph, union ccb *ccb)
 		printf("%s%d: %s\n", periph->periph_name,
 		    periph->unit_number, buf);
 	}
+	if ((softc->disk->d_flags & DISKFLAG_WRITE_PROTECT) != 0 &&
+	    (softc->flags & DA_FLAG_ANNOUNCED) == 0) {
+		printf("%s%d: Write Protected\n", periph->periph_name,
+		    periph->unit_number);
+	}
 
 	/*
 	 * Since our peripheral may be invalidated by an error


More information about the svn-src-all mailing list