FUNCTION::RETURNSTR(3stap)

πŸ’– FUNCTION::RETURNSTR πŸ’–

okay bestie, welcome to the Errno Tapset corner of the SystemTap Tapset Reference, section 3stap πŸŽ€ this one is tiny but it's a whole vibe, let's get into it


✨ NAME ✨

function::returnstr β€” it formats the return value as a string, that's the whole job, that's the whole girl πŸ’…


🌸 SYNOPSIS 🌸

returnstr:string(format:long)

πŸ¦‹ ARGUMENTS πŸ¦‹

  • format β€” this is the variable that determines the return type base value πŸ‘‘ you're basically telling it how to read the number, she's not gonna guess, she's not psychic, hand her the format fr fr

⭐ DESCRIPTION ⭐

so here's the tea β˜• this function is used by the nd_syscall tapset, and what does it do? it returns a string. that's it, that's the deliverable πŸ’–

you set format like this:

  • set format equal to 1 for decimal πŸ“
  • set format equal to 2 for hex ✨
  • set format equal to 3 for octal 🌈
🚨 ok this is the important part, don't skip it 🚨 note that this function should only be used in dwarfless probes (i.e. kprobe.function(β€œfoo”)). other probes should use return_str instead. literally do not use this one anywhere else, she has a very specific lane and she stays in it πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘

tapset::errno(3stap) β€” go read that one too, iykyk πŸ’œ


ok that's the whole page, no cap, you ate this 🫢 it's all from the SystemTap Tapset Reference, version dated September 2026 β€” mwah, go forth and format your return values, icon πŸŒŸπŸ’…

πŸ“¦ where this page comes from