parse_bool(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… parse_bool(9) β€” the kernel API manual, bestie edition πŸŽ€

okay so this is parse_bool, straight out of the Kernel API Manual, and honestly? she's a tiny little function with main character energy. all she does is take a string and turn it into a bool. that's it. that's the girl. ✨


🌸 NAME 🌸

parse_bool β€” literally just parse a two-valued option into a bool, no cap πŸ’–


✨ SYNOPSIS ✨

int parse_bool (const char *bool_str , const char *true_str , const char
*false_str , bool *bool_ptr );

like, four args, one int back. iconic. πŸ¦‹


🫢 ARGUMENTS 🫢

  • bool_str β€” the string value you're trying to convert into a bool. the star of the show. the one getting vibe checked. πŸ‘‘
  • true_str β€” the string value that should get converted to true. like, if bool_str matches this, congrats, it's true. πŸŽ€
  • false_str β€” the string value that should get converted to false. the other member of the duo. ⭐
  • bool_ptr β€” a pointer to return the bool value in. she's the drop-off spot. the result goes here. πŸ’Œ

πŸ”₯ RETURN πŸ”₯

VDO_SUCCESS β€” slay β€” or an error if bool_str is neither true_str nor false_str. like, if it's neither of the two things you said were valid, bestie, that's an error, and that's on periodt. πŸ’€


🌈 SEE ALSO 🌈

okay this list is long long, so buckle up β€” everything below is a (9) reference, and the whole thing lives in the kernel file ./drivers/md/dm-vdo/dm-vdo-target.c. no i'm not skipping any of them, we don't do that here:


πŸ’œ friendly reminder: this page comes from ./drivers/md/dm-vdo and it's dated October 2026. if you're reading it in some other month... iykyk πŸ™ˆ

and that's the whole page, bestie β€” go forth and parse your bools responsibly. parse_bool(9), ./drivers/md/dm-vdo, October 2026. mwah πŸ’‹πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from