According to SPC-4 in the PERSISTENT RESERVE IN full status descriptor

the format of byte 13 is defined as follows:
- The most significant four bits are SCOPE field.
- The least significant four bits are the TYPE field.
Make sure that that byte is filled in according to the specification.

BSD-Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3950 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2011-12-02 02:46:33 +00:00
parent ae55aa9e36
commit 5cc78efff5

View File

@@ -2770,7 +2770,7 @@ void scst_pr_read_full_status(struct scst_cmd *cmd, uint8_t *buffer,
if (dev->pr_is_set && scst_pr_is_holder(dev, reg)) {
buffer[offset + 12] = 1;
buffer[offset + 13] = (dev->pr_scope << 8) | dev->pr_type;
buffer[offset + 13] = (dev->pr_scope << 4) | dev->pr_type;
}
put_unaligned_be16(reg->rel_tgt_id,