TPMLIB_SetDebugFD(3)

πŸ’– TPMLIB_SetDebugFD β€” the debug-vibes trio, explained ✨

okay bestie, so this page is from the TPMLIB girlies β€” that's the TPMLIB_SetDebugFD(3) manual, and it's actually covering three functions at once, which is giving ✨overachiever✨ energy and honestly? we stan. πŸŽ€

🌸 NAME 🌸

  • TPMLIB_SetDebugFD β€” sets the file descriptor where all that debug output gets sent πŸ’Œ
  • TPMLIB_SetDebugLevel β€” sets the debugging level πŸ”₯
  • TPMLIB_SetDebugPrefix β€” sets the prefix that goes in front of every single debugging line πŸŽ€

πŸ¦‹ LIBRARY πŸ¦‹

The TPM library, a.k.a. libtpms, and you link it like -ltpms. that's it, that's the vibe. πŸ’…

✨ SYNOPSIS ✨

okay so this is exactly what you include and exactly how you call these, no cap:

#include <libtpms/tpm_library.h>

uint32_t TPMLIB_SetDebugFD(int fd);

uint32_t TPMLIB_SetDebugLevel(unsigned int level);

uint32_t TPMLIB_SetDebugPrefix(const char *prefix);

πŸ’œ DESCRIPTION πŸ’œ

so TPMLIB_SetDebugFD() is the one that lets you set the file descriptor that the debug output gets sent to. like, where the tea gets spilled. 🫢

then there's TPMLIB_SetDebugLevel(), which lets you set the debug level. and here's the important part, bestie β€” only debug levels greater than 1 will produce output. 😭 the indentation level of a line is what decides whether it gets printed at all:

  • lines with 0 indentation β†’ printed at debug level 1
  • 1 space of indentation β†’ printed at debug level 2
  • and so on, like a little staircase of vibes πŸ’…

and TPMLIB_SetDebugPrefix() lets you set a prefix that gets printed in front of every single line of debugging output. the prefix can be used for further indentation, which is lowkey iconic if you're into that. 🌸

fr fr, memorize the >1 rule β€” level 1 alone is giving radio silence πŸ’€

and that's the whole page, bestie! 🌈 the manual name is TPMLIB_SetDebugFD, and the footer tea is that this comes from libtpms and is dated 2026-01-02 β€” so yeah, it's TPMLIB_SetDebugFD(3) szn. slay, go debug something. πŸ‘‘πŸ’–

πŸ“¦ where this page comes from