update IdCtrl and Log format for padding

This commit is contained in:
Jelena Ilic 2020-06-29 13:20:13 -07:00
Родитель b3559a4f53
Коммит ace95b9108
3 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -29,7 +29,7 @@ LOG_FETCH_DELAY = 0.01
# Limiting the number of log pages that can be fetched from a single device
# to avoid overwhelming the telemetry pipe.
LOG_VU_MAX = 5
LOG_VU_MAX = 6
LOG_PAGE_DIR = os.path.join(os.path.dirname(__file__), "LogPages/")
LOG_PAGE_DIR_VU = LOG_PAGE_DIR

Просмотреть файл

@ -19,7 +19,7 @@ def byte_swap_enable(enable):
def struct_to_dict(struct_data, log_dict):
for field in struct_data._fields_:
if (not field[0].startswith("reserved")):
if (not (field[0].startswith("reserved") or field[0].startswith("rsv") or field[0].startswith("not_populated_yet") or field[0].startswith("padding"))):
value = getattr(struct_data, field[0])
if (isinstance(value, int) or isinstance(value, str)):
log_dict.update({field[0]:value})

Просмотреть файл

@ -295,7 +295,7 @@ def GetNVMeIdentify(disk_number, scope):
specificdata.QueryType = PROPERTY_STANDARD_QUERY
specificdata.ProtocolType = PROTOCOL_TYPE_NVME
specificdata.DataType = NVME_DATA_TYPE_IDENTIFY
specificdata.ProtocolDataRequestValue = scope
specificdata.ProtocolDataRequestValue = 1
specificdata.ProtocolDataRequestSubValue = 0
# Must subtract 8 from the offset to account for putting PropertyID and QueryType into