svn commit: r341681 - head/sys/cam/scsi
Andriy Gapon
avg at FreeBSD.org
Fri Dec 7 12:02:33 UTC 2018
Author: avg
Date: Fri Dec 7 12:02:31 2018
New Revision: 341681
URL: https://svnweb.freebsd.org/changeset/base/341681
Log:
daprobedone: announce if a disk is write-protected
MFC after: 2 weeks
Modified:
head/sys/cam/scsi/scsi_da.c
Modified: head/sys/cam/scsi/scsi_da.c
==============================================================================
--- head/sys/cam/scsi/scsi_da.c Fri Dec 7 11:47:42 2018 (r341680)
+++ head/sys/cam/scsi/scsi_da.c Fri Dec 7 12:02:31 2018 (r341681)
@@ -2472,6 +2472,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-head
mailing list