compare_dents(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… compare_dents(9) β€” like, the kernel API manual, but make it make sense πŸŽ€

okay so bestie, welcome to compare_dents(9) from the Kernel API Manual ✨ this one is short but she is mighty, and honestly? she's giving comparator-core πŸ’–


🌸 NAME 🌸

compare_dents β€” compares directory entries by their hash value, no cap πŸ”₯


✨ SYNOPSIS ✨

int compare_dents (const void *a , const void *b );

that's it. that's the whole signature. she's compact, she's iconic, she's literally two const void * besties and an int πŸ‘‘


πŸ¦‹ ARGUMENTS πŸ¦‹

  • a β€” the first dent πŸ“
  • b β€” the second dent 🌸

two dents, one comparison, main character energy all around πŸ’…


πŸ’œ DESCRIPTION πŸ’œ

so when you're comparing the hash entries of a to b, here's the whole vibe check πŸ‘‡

  • gt (greater than, iykyk) β†’ returns 1 πŸ”₯
  • lt (less than, we've all been there) β†’ returns -1 😭
  • eq (equal, twin flame behaviour) β†’ returns 0 🫢

that's literally it bestie β€” it's a comparator, she compares, she returns, she leaves. periodt ✨


πŸ‘‘ SEE ALSO πŸ‘‘

the kernel file ./fs/gfs2/dir.c, plus this whole friend group right here πŸ’–

like, the whole squad showed up πŸŒˆπŸ’€ go read them, i'm begging πŸ™ˆ


heads up bestie: this page lives at ./fs/gfs2 in the source tree, so if you go looking for her, that's where she's at πŸ§šβ€β™€οΈ

that's the page, you ate that πŸ’… source is ./fs/gfs2, and she was dated October 2026 β€” literally a future icon ⭐ bye bestie, go compare some dents πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from