Date: Wed, 26 Dec 2018 09:19:13 +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-11@freebsd.org Subject: svn commit: r342471 - stable/11/sys/cam/scsi Message-ID: <201812260919.wBQ9JDIs090104@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812260919.wBQ9JDIs090104>