scsi_ch_swp -V (return code: 1)
open error: version [read only]: No such file or directory blockdev's RO flag: blockdev: cannot open version: No such file or directory
scsi_ch_swp --help (return code: 0)
Usage: scsi_ch_swp [-h] [-s 0|1] [-v] [-w] <blk_device> where: -h, --help print usage message -s 0|1, --set 0|1 where: 0 - clear SWP and set RW mode 1 - set SWP and set RO mode (default: read SWP and get RO flag) -v, --verbose more verbose, show commands invoked -w, --wr access <blk_device> read-write when '-s 0' (default: access read-only in this case) Access the Software Write Protect (SWP) bit in the SCSI control mode page and if changed adjust the Linux block device (e.g. /dev/sdc) settings accordingly. If supported, when the SWP bit is set (1) the device is read-only; when clear (0) the device is read-write (i.e. its contents can be read and changed). When no options given it reads SWP and gets blockdev's RO flag.