keys_eq(9)
β¨ keys_eq(9) β¨
okay so real quick β this is a page from the Kernel API Manual, and honestly? it's a little baby function but it's a crucial little baby function. it lives in the UBIFS world and it's coming to you straight from ./fs/ubifs. let's get into it π
πΈ NAME πΈ
keys_eq β determine if keys are equivalent.
like... are these two keys the same key? that's it. that's the whole vibe check. π
π¦ SYNOPSIS π¦
int keys_eq (const struct ubifs_info *c , const union ubifs_key *key1 ,
const union ubifs_key *key2 );
π ARGUMENTS π
cβ the UBIFS file-system description object π«Ά (yes bestie, the whole filesystem gets to come along)key1β the first key to compare πΈkey2β the second key to compare πΈ
π₯ DESCRIPTION π₯
okay so here's the tea: this function compares 2 keys. that's the whole job. and then it returns:
1ifkey1is equal tokey20if not
no cap. it's giving "tiny function, huge responsibility" energy and honestly? iconic. it doesn't tell you how they're equal, it doesn't rank them, it doesn't do the keys_cmp thing β it literally just hits you with the yes/no binary. main character energy fr fr πβ¨
π SEE ALSO π
if you're gonna hang out in ./fs/ubifs/key.h (the Kernel file π§), there's like a whole friend group of key functions you should meet:
key_mask_hash(9), key_r5_hash(9), key_test_hash(9), ino_key_init(9), ino_key_init_flash(9), lowest_ino_key(9), highest_ino_key(9), dent_key_init(9), dent_key_init_hash(9), dent_key_init_flash(9), lowest_dent_key(9), xent_key_init(9), xent_key_init_flash(9), lowest_xent_key(9), data_key_init(9), highest_data_key(9), trun_key_init(9), invalid_key_init(9), key_type(9), key_type_flash(9), key_inum(9), key_inum_flash(9), key_hash(9), key_hash_flash(9), key_block(9), key_block_flash(9), key_read(9), key_write(9), key_write_idx(9), key_copy(9), keys_cmp(9), is_hash_key(9), key_max_inode_size(9)
that's the whole squad. go say hi π¦π
lowkey the most important thing on this whole page:1= equal,0= not equal. don't flip it. i'm begging π
and that's the page bestie!! brought to you by ./fs/ubifs, dated October 2026, and yes it's still keys_eq(9) at the bottom because we keep the branding consistent π
β¨ slay.
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms