示例#1
0
文件: tpm.go 项目: carriercomm/pond
func (e Error) Code() ErrorCode {
	return ErrorCode(C.Trspi_Error_Code(e.result))
}
示例#2
0
文件: tpm.go 项目: carriercomm/pond
func (e Error) Error() string {
	return fmt.Sprintf("tpm: layer: %s, code: 0x%x: %s", C.GoString(C.Trspi_Error_Layer(e.result)), C.Trspi_Error_Code(e.result), C.GoString(C.Trspi_Error_String(e.result)))
}