Skip to content

Commit c8c897a

Browse files
committed
Add a function to get the TPM device number
Add a function to get the TPM device number Signed-off-by: Stefan Berger <[email protected]>
1 parent 97e5410 commit c8c897a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

libcontainer/vtpm/vtpm.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,10 @@ func (vtpm *VTPM) GetTPMDevname() string {
451451
return fmt.Sprintf("/dev/tpm%d", vtpm.tpm_dev_num)
452452
}
453453

454+
func (vtpm *VTPM) GetTPMDevNum() uint32 {
455+
return vtpm.tpm_dev_num
456+
}
457+
454458
// Get the major and minor numbers of the created device;
455459
// This method can be called after Start()
456460
func (vtpm *VTPM) GetMajorMinor() (uint32, uint32) {

0 commit comments

Comments
 (0)