Date: Wed, 26 Dec 2018 09:16:03 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r342470 - stable/12/sys/cam/scsi Message-ID: <201812260916.wBQ9G398089883@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avg Date: Wed Dec 26 09:16:03 2018 New Revision: 342470 URL: https://svnweb.freebsd.org/changeset/base/342470 Log: MFC r341681: daprobedone: announce if a disk is write-protected Modified: stable/12/sys/cam/scsi/scsi_da.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/12/sys/cam/scsi/scsi_da.c Wed Dec 26 07:57:21 2018 (r342469) +++ stable/12/sys/cam/scsi/scsi_da.c Wed Dec 26 09:16:03 2018 (r342470) @@ -2457,6 +2457,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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812260916.wBQ9G398089883>