tpm_buf_length(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… tpm_buf_length β€” like, the kernel API manual bestie πŸ’…

okay so you're looking at the tpm_buf_length(9) page, obviously, and it's a tiny little function but it's lowkey iconic. it lives in the kernel API manual, and it does exactly one thing: it tells you the number of bytes consumed by the data. that's it. that's the whole vibe. periodt. ✨


🌸 NAME 🌸

tpm_buf_length β€” returns the number of bytes consumed by the data πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

u16 tpm_buf_length (struct tpm_buf *buf );

no cap, that's the whole signature. it takes one pointer and hands you back a u16. simple. elegant. main character energy. πŸ’œ


πŸ’– ARGUMENTS πŸ’–

  • buf β€” a tpm_buf. yep. that's the entire description. she's a tpm_buf. that's the whole argument. ngl it's giving "the docs said what they said" but honestly? respect. 🫢

🌈 RETURN 🌈

the number of bytes consumed by the buffer. that is literally it. the return value is the byte count, and the byte count is the return value, and honestly the way that works out is kind of beautiful. πŸ˜­πŸ’•

bestie the return type is u16 so like… it's a 16-bit number. the manpage doesn't editorialize about overflow and neither will i, but just. keep it in mind. iykyk. πŸ’€

⭐ SEE ALSO ⭐

okay this is where the friend group shows up, because tpm_buf_length does NOT roll alone:

the whole tpm_buf squad, assembled. ate. πŸ”₯


okay that's the page!! no notes, she's short and she knows it πŸ’…

mwah πŸ’‹ β€” this was brought to you by ./drivers/char/tpm, dated October 2026, and the kernel API manual. go read tpm-buf.c if you want the full lore πŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from