dm_parse_devices(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’« dm_parse_devices(9) πŸ’«

okay so bestie, welcome to the Kernel API Manual β€” yes that's the manual name, we're fancy here. this page is all about dm_parse_devices(9), a little function that does exactly one job and does it slayfully. let's get into it πŸŽ€


✨ NAME ✨

dm_parse_devices β€” parses the "dm-mod.create=" argument 🫢

like, that's it. that's the whole vibe. it takes that kernel command-line argument and makes sense of it. no cap.


🌸 SYNOPSIS 🌸

int dm_parse_devices (struct list_head *devices , char *str );

look at her go πŸ’… the return type is int, she takes two args β€” genuinely iconic signature.


πŸ¦‹ ARGUMENTS πŸ¦‹

  • devices β€” a list of struct dm_device, and its whole purpose in life is to store the parsed information. she's the container, the moment, the main character. ✨
  • str β€” the pointer to a string, and that string has to be in this exact format:
<device>[;<device>+]

so: one <device>, then optionally a ; followed by one or more more <device>s, and so on. the + means "keep going", iykyk. πŸ™ˆ

lowkey important: match the format exactly β€” <device>[;<device>+] β€” because that's literally what the function is expecting to chew on. πŸ“

🧚 SEE ALSO 🧚

the whole little parsing friend group honestly πŸ”₯ go read them, they're all linked up and they all live near each other in ./drivers/md/dm-init.c.


and that's the page, bestie!! πŸ’– this came to you from ./drivers/md and it's dated October 2026 β€” so like, future vibes but make it kernel. mwah, go parse something. πŸ’œπŸŒˆπŸ‘‘

πŸ“¦ where this page comes from