ns_cmp(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ns_cmp(9)

okay bestie, so this is a page from the Kernel API Manual β€” yes, the ns_cmp(9) one, we're doing this, we're thriving ✨


πŸŽ€ NAME πŸŽ€

ns_cmp β€” literally just compares ns for label set ordering. that's the whole vibe, that's the assignment πŸ’…


✨ SYNOPSIS ✨

int ns_cmp (struct aa_ns *a , struct aa_ns *b );

look at her. two pointers in, one int out. iconic behavior tbh 🫢


🌸 ARGUMENTS 🌸

  • a β€” the ns you wanna compare. NOT NULL β€” like, do not pass her a null, i'm begging 😭
  • b β€” the other ns you wanna compare. also NOT NULL, same energy, no cap πŸ™ˆ

🌈 RETURN 🌈

so the return value is doing the classic three-way thing, keep up:

  • <0 if a < b
  • ==0 if a == b
  • >0 if a > b

fr fr that's it, that's the whole mood πŸ’–


πŸ¦‹ SEE ALSO πŸ¦‹

bestie there are SO many siblings, get comfy, this is a whole family reunion πŸ‘‘

also, for the record, this all lives in the kernel file ./security/apparmor/label.c πŸ‘€


okay that's the page!! shoutout to ./security/apparmor and the October 2026 date stamp for being here with us, mwah πŸ’œπŸ§š hope this made sense, ily, go compare some ns πŸ“β­

πŸ“¦ where this page comes from