TPMLIB\_SetDebugFD(3) TPMLIB\_SetDebugFD(3)

# [NAME](#NAME)

TPMLIB\_SetDebugFD - Set the file descriptor to send the debug output to

TPMLIB\_SetDebugLevel - Set the debugging level

TPMLIB\_SetDebugPrefix - Set the prefix for each debugging line

# [LIBRARY](#LIBRARY)

TPM library (libtpms, -ltpms)

# [SYNOPSIS](#SYNOPSIS)

**#include &lt;libtpms/tpm\_library.h**&gt;

**uint32\_t TPMLIB\_SetDebugFD(int fd);**

**uint32\_t TPMLIB\_SetDebugLevel(unsigned int level);**

**uint32\_t TPMLIB\_SetDebugPrefix(const char \*prefix);**

# [DESCRIPTION](#DESCRIPTION)

**TPMLIB\_SetDebugFD()** allows to set the file descriptor to send the debug output to.

**TPMLIB\_SetDebugLevel()** allows to set the debug level. Only debug levels greater than 1 will produce output. The indentation level of a line will determine whether it is printed. Lines with 0 indentation will be printed at debug level 1, 1 space of indentation at debug level 2 and so on.

**TPMLIB\_SetDebugPrefix()** allows to set a prefix that is to be printed in front of every line of debugging output. The prefix can be used for further indentation.

2026-10-01 libtpms

---

Document: TPMLIB_SetDebugFD(3) from libtpms 0.10.2-r3 (Chainguard OS)
Source: https://github.com/stefanberger/libtpms
