dmmp_...y_get(3)
π dmmp_mpath_array_get π
okay bestie, so this one lives in the Device Mapper Multipath API - libdmmp Manual, and it's genuinely one of the most useful little functions in the whole libdmmp lineup. it's giving "show me every multipath device that exists right now" and honestly? iconic.
β¨ NAME β¨
dmmp_mpath_array_get β query all existing multipath devices. all of them. every single one. no crumbs left behind. π¦
β¨ SYNOPSIS β¨
int dmmp_mpath_array_get (struct dmmp_context *ctx, struct dmmp_mpath
***dmmp_mps, uint32_t *dmmp_mp_count);
look at her. three arguments. not one, not two. three. and every one of them matters, so don't get cute and skip any π
β¨ ARGUMENTS β¨
ctxβ pointer ofstruct dmmp_context. this is your context bestie, the main character. if this pointer isNULL, your program will be terminated byassert. like, straight up. no warning text, no graceful exit, just gone. so pls do not passNULLπdmmp_mpsβ output pointer array ofstruct dmmp_mpath. this is where the results land. if this pointer isNULL, your program will be terminated byassert. same deal. do not test her.dmmp_mp_countβ output pointer ofuint32_t. it holds the size of thedmmp_mpspointer array, aka "how many multipath devices did we just find". if this pointer isNULL, your program will be terminated byassert. yes, all three of them assert. it's a whole thing. π«Ά
β¨ DESCRIPTION β¨
so what does she actually do? she queries all existing multipath devices and stores them into a pointer array. that's the whole vibe. every multipath device that exists, swept up into dmmp_mps like the universe collecting its faves. π
β οΈ real talk though: the memory ofdmmp_mpsshould be freed viadmmp_mpath_array_free. do NOT forget this. do not leave her hanging. free your memory, bestie, that's the rule. π
β¨ RETURN β¨
returns an int. the valid error codes are:
DMMP_OKDMMP_ERR_BUGDMMP_ERR_NO_MEMORYDMMP_ERR_NO_DAEMONDMMP_ERR_INCONSISTENT_DATA
and if you get one of these numbers back and you're like "what does that even mean π" β the error number could be converted to string by dmmp_strerror. she translates. she's helpful like that. β
and that's the whole page, bestie! this one's from the <strong>libdmmp</strong> manual, page <code>dmmp_...y_get(3)</code>, all about <code>dmmp_mpath_array_get</code>, dated <strong>June 2025</strong>. go forth, query your multipath devices, and free that array. periodt. πβ¨π
π¦ where this page comes from
- arch rolling: multipath-tools 0.15.1-1 Β· GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-2.0-or-later AND LGPL-2.1-or-later
- fedora 44: libdmmp-devel 0.13.1-1.fc44 Β· GPL-2.0-only AND GPL-3.0-only
- fedora 44: libdmmp-devel 0.13.1-1.fc44 Β· GPL-2.0-only AND GPL-3.0-only
- nixos 26.05: multipath-tools 0.14.1
- nixpkgs unstable: multipath-tools 0.14.3
- opensuse-leap 16.0: libdmmp-devel 0.12.4+278+suse.9cf9c5c-160000.1.1 Β· GPL-3.0-or-later
- opensuse-leap 16.0: libdmmp-devel 0.12.4+278+suse.9cf9c5c-160000.1.1 Β· GPL-3.0-or-later
- opensuse-leap 16.0: libdmmp-devel 0.12.4+278+suse.9cf9c5c-160000.1.1 Β· GPL-3.0-or-later
- opensuse-leap 16.0: libdmmp-devel 0.12.4+278+suse.9cf9c5c-160000.1.1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms