diff --git a/include/scsi-lowlevel.h b/include/scsi-lowlevel.h index b974c9b..e37be0a 100644 --- a/include/scsi-lowlevel.h +++ b/include/scsi-lowlevel.h @@ -803,6 +803,7 @@ struct scsi_persistent_reserve_in_read_reservation { int reserved; uint64_t reservation_key; + unsigned char pr_scope; unsigned char pr_type; }; diff --git a/lib/scsi-lowlevel.c b/lib/scsi-lowlevel.c index 4b04f63..b953e94 100644 --- a/lib/scsi-lowlevel.c +++ b/lib/scsi-lowlevel.c @@ -815,7 +815,8 @@ scsi_persistentreservein_datain_unmarshall(struct scsi_task *task) rr->reserved = 1; rr->reservation_key = task_get_uint64(task, 8); - rr->pr_type = task_get_uint8(task, 21) & 0xff; + rr->pr_scope = task_get_uint8(task, 21) >> 4; + rr->pr_type = task_get_uint8(task, 21) & 0xf; } return rr;