ubifs_tnc_locate(9)
okay bestie, welcome to ubifs_tnc_locate(9) from the Kernel API Manual β this is the page where we find a file-system node, return it, and spill where it lives. π
β¨
π NAME π
ubifs_tnc_locate β look up a file-system node, hand it back to you, and also tell you its location. iconic behavior, honestly π
β¨ SYNOPSIS β¨
int ubifs_tnc_locate (struct ubifs_info *c , const union ubifs_key *key , void *node , int *lnum , int *offs );
πΈ ARGUMENTS πΈ
cβ the UBIFS file-system description object. your main character struct π«Άkeyβ the node key to look up. this is the thing you're hunting for πnodeβ the node is returned here. yes, this is where it gets handed back to you πlnumβ the LEB number is returned here. location reveal moment β¨offsβ the offset is returned here. the other half of the location vibe check π
π DESCRIPTION π
So this function looks up and reads the node with key key. periodt π
β οΈ the caller has to make sure the node buffer is large enough to fit the node. that part is on you, bestie β don't skimp on buffer space π
It returns 0 in case of success, -ENOENT if the node was not found, and a negative error code in case of failure. no cap. the node location can be returned in lnum and offs β so if you asked for the coordinates, that's where they show up πΊοΈβ¨
π¦ SEE ALSO π¦
Kernel file ./fs/ubifs/tnc.c β plus the whole squad: insert_old_idx(9), insert_old_idx_znode(9), ins_clr_old_idx_znode(9), destroy_old_idx(9), copy_znode(9), add_idx_dirt(9), replace_znode(9), dirty_cow_znode(9), lnc_add(9), lnc_free(9), tnc_read_hashed_node(9), try_read_node(9), fallible_read_node(9), matches_name(9), get_znode(9), tnc_next(9), tnc_prev(9), resolve_collision(9), fallible_matches_name(9), fallible_resolve_collision(9), matches_position(9), resolve_collision_directly(9), dirty_cow_bottom_up(9), ubifs_lookup_level0(9), lookup_level0_dirty(9), maybe_leb_gced(9), ubifs_tnc_get_bu_keys(9), read_wbuf(9), validate_data_node(9), ubifs_tnc_bulk_read(9), do_lookup_nm(9), ubifs_tnc_lookup_nm(9), ubifs_tnc_lookup_dh(9), correct_parent_keys(9), insert_zbranch(9), tnc_insert(9), ubifs_tnc_add(9), ubifs_tnc_replace(9), ubifs_tnc_add_nm(9), tnc_delete(9), ubifs_tnc_remove(9), ubifs_tnc_remove_nm(9), ubifs_tnc_remove_dh(9), key_in_range(9), ubifs_tnc_remove_range(9), ubifs_tnc_remove_ino(9), ubifs_tnc_next_ent(9), tnc_destroy_cnext(9), ubifs_tnc_close(9), left_znode(9), right_znode(9), lookup_znode(9), is_idx_node_in_tnc(9), is_leaf_node_in_tnc(9), ubifs_tnc_has_node(9), ubifs_dirty_idx_node(9), dbg_check_inode_size(9). go read some nodes, bestie π§π
signed off with love from source/version ./fs/ubifs, dated October 2026, on the ubifs_tnc_locate(9) page β bye bestie, stay 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