Removed custom struct for tracking Persistent Resvn type.
This commit is contained in:
@@ -181,6 +181,7 @@ scsi_inquiry_pagecode_to_str
|
||||
scsi_protocol_identifier_to_str
|
||||
scsi_reportluns_cdb
|
||||
scsi_sense_ascq_str
|
||||
scsi_pr_type_str
|
||||
scsi_sense_key_str
|
||||
scsi_set_task_private_ptr
|
||||
scsi_task_add_data_in_buffer
|
||||
|
||||
@@ -163,6 +163,28 @@ scsi_sense_ascq_str(int ascq)
|
||||
return value_string_find(ascqs, ascq);
|
||||
}
|
||||
|
||||
const char *
|
||||
scsi_pr_type_str(enum scsi_persistent_out_type pr_type)
|
||||
{
|
||||
struct value_string pr_type_strings[] = {
|
||||
{SCSI_PERSISTENT_RESERVE_TYPE_WRITE_EXCLUSIVE,
|
||||
"Write Exclusive"},
|
||||
{SCSI_PERSISTENT_RESERVE_TYPE_EXCLUSIVE_ACCESS,
|
||||
"Exclusive Access"},
|
||||
{SCSI_PERSISTENT_RESERVE_TYPE_WRITE_EXCLUSIVE_REGISTRANTS_ONLY,
|
||||
"Write Exclusive, Registrants Only"},
|
||||
{SCSI_PERSISTENT_RESERVE_TYPE_EXCLUSIVE_ACCESS_REGISTRANTS_ONLY,
|
||||
"Exclusive Access Registrants Only"},
|
||||
{SCSI_PERSISTENT_RESERVE_TYPE_WRITE_EXCLUSIVE_ALL_REGISTRANTS,
|
||||
"Write Exclusive, All Registrants"},
|
||||
{SCSI_PERSISTENT_RESERVE_TYPE_EXCLUSIVE_ACCESS_ALL_REGISTRANTS,
|
||||
"Exclusive Access, All Registrants"},
|
||||
{0, NULL}
|
||||
};
|
||||
|
||||
return value_string_find(pr_type_strings, pr_type);
|
||||
}
|
||||
|
||||
inline uint64_t
|
||||
scsi_get_uint64(const unsigned char *c)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user