analyze: show priority in 'nvpcrs' output
This commit is contained in:
@@ -43,6 +43,7 @@ static int add_nvpcr_to_table(Tpm2Context **c, Table *t, const char *name) {
|
||||
t,
|
||||
TABLE_STRING, name,
|
||||
TABLE_UINT32_HEX_0x, nv_index,
|
||||
TABLE_UINT64, priority,
|
||||
TABLE_STRING, h);
|
||||
if (r < 0)
|
||||
return table_log_add_error(r);
|
||||
@@ -62,16 +63,17 @@ int verb_nvpcrs(int argc, char *argv[], uintptr_t _data, void *userdata) {
|
||||
if (!have_tpm2)
|
||||
log_notice("System lacks full TPM2 support, not showing NvPCR state.");
|
||||
|
||||
table = table_new("name", "nvindex", "value");
|
||||
table = table_new("name", "nvindex", "priority", "value");
|
||||
if (!table)
|
||||
return log_oom();
|
||||
|
||||
(void) table_set_align_percent(table, table_get_cell(table, 0, 1), 100);
|
||||
(void) table_set_align_percent(table, table_get_cell(table, 0, 2), 100);
|
||||
table_set_ersatz_string(table, TABLE_ERSATZ_DASH);
|
||||
(void) table_set_sort(table, (size_t) 0);
|
||||
(void) table_set_sort(table, (size_t) 2, (size_t) 0);
|
||||
|
||||
if (!have_tpm2)
|
||||
(void) table_hide_column_from_display(table, (size_t) 2);
|
||||
(void) table_hide_column_from_display(table, (size_t) 3);
|
||||
|
||||
if (strv_isempty(strv_skip(argv, 1))) {
|
||||
_cleanup_strv_free_ char **l = NULL;
|
||||
|
||||
Reference in New Issue
Block a user