pcr0tool: Minor improvements
* List commands alphabetically. * Use log.Fatalf instead of panic
This commit is contained in:
parent
2482898beb
commit
2e0822abc9
|
@ -71,7 +71,7 @@ func (cmd Command) Execute(ctx context.Context, args []string) {
|
|||
}
|
||||
}
|
||||
if hashAlgo == tpm2.AlgUnknown {
|
||||
panic(fmt.Errorf("algo '%s' is unknown", *cmd.hashAlgo))
|
||||
log.Fatalf("algo '%s' is unknown", *cmd.hashAlgo)
|
||||
}
|
||||
pcr, err := tpm.ReadPCRFromTPM(pcr.ID(pcrIndex), hashAlgo)
|
||||
assertNoError(err)
|
||||
|
|
|
@ -32,9 +32,9 @@ var knownCommands = map[string]commands.Command{
|
|||
"display_fwinfo": &displayfwinfo.Command{},
|
||||
"dump_fit": &dumpfit.Command{},
|
||||
"dump_registers": &dumpregisters.Command{},
|
||||
"pcrread": &pcrread.Command{},
|
||||
"printnodes": &printnodes.Command{},
|
||||
"validate_security": &validatesecurity.Command{},
|
||||
"pcrread": &pcrread.Command{},
|
||||
"sum": &sum.Command{},
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue