dmmp_...t_new(3)

πŸ“¦
version 0.15.1 Β· 3 versions
, in arch rolling, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0

πŸ’– dmmp_context_new β€” from the libdmmp manual (Device Mapper Multipath API) πŸ’–

okay bestie, sit down, hydrate, and let's talk about dmmp_context_new ✨ this one's a lil baby function and it's literally so easy, you're gonna slay it.


✨ NAME ✨

dmmp_context_new β€” create a struct dmmp_context. that's it, that's the whole job πŸŽ€


🌸 SYNOPSIS 🌸

struct dmmp_context * dmmp_context_new (void);

πŸ¦‹ ARGUMENTS πŸ¦‹

  • void β€” no arguments. not a single one. she takes nothing and gives you everything πŸ’…

πŸ’œ DESCRIPTION πŸ’œ

so when you spin up a brand new context, the default logging level (DMMP_LOG_PRIORITY_DEFAULT) is DMMP_LOG_PRIORITY_WARNING. what that means in real life: only warning and error messages get forwarded to the log handler function. like, she's not gonna yap about every little thing, only the stuff that matters πŸ”₯

and the default log handler function? it prints log messages straight to STDERR. if that's not the vibe you want, no worries β€” you can change it with dmmp_context_log_func_set and set your own log handler 🫢

for the deets on all that, go check the manpage libdmmp.h(3), iykyk πŸ“–

πŸ‘‘ RETURN πŸ‘‘

you get back a pointer to 'struct dmmp_context' πŸ’–

⚠️ bestie, important: that pointer should be freed by dmmp_context_free. don't just leave her out there, that's not main character energy, that's a leak 😭

and that's the whole page, no notes πŸ’œ

signing off from the libdmmp manual, Device Mapper Multipath API β€” this page was dmmp_context_new, served up by dmmp_...t_new(3), dated June 2025. love u, go free your contexts 🌈✨