1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-02 12:20:51 +00:00

daprobedone: announce if a disk is write-protected

MFC after:	2 weeks
This commit is contained in:
Andriy Gapon 2018-12-07 12:02:31 +00:00
parent 2605ddfce9
commit 2e2b365e47
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=341681

View File

@ -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