scan_get_pnode(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

hey bestie! welcome to the scan_get_pnode(9) page from the Kernel API Manual πŸ’– this is the group chat where we learn how to get a pnode from either the tree or flash. let's go! ✨

✨ NAME ✨

okay so the name is literally scan_get_pnode β€” and it does exactly what it says on the tin: for the scan, it gets a pnode from either the tree or flash. no cap. πŸŽ€

🌸 SYNOPSIS 🌸

here's the function signature, copy it exactly bestie, no typos allowed πŸ’…

struct ubifs_pnode * scan_get_pnode (struct ubifs_info *c , struct
       lpt_scan_node *path , struct ubifs_nnode *parent , int iip );

πŸ’œ ARGUMENTS πŸ’œ

  • c β€” the UBIFS file-system description object. like, the main character of this whole operation πŸ’…
  • path β€” where to put the pnode. that's the spot, bestie πŸ“
  • parent β€” parent of the pnode. family tree vibes 🌳
  • iip β€” index in parent of the pnode. like, which child is it? πŸ”’

πŸ”₯ DESCRIPTION πŸ”₯

okay so here's the tea: this function returns a pointer to the pnode on success, and a negative error code on failure. that's it. that's the whole vibe check ✨

lowkey important: a negative error code means something went wrong, so don't ignore it bestie 😭

🌈 SEE ALSO 🌈

the SEE ALSO section is literally a whole squad of related functions and structs, so here's the full list, no skips, no cap 🫢

       Kernel file ./fs/ubifs/lpt.c do_calc_lpt_geom(9),
       ubifs_calc_lpt_geom(9), calc_dflt_lpt_geom(9), pack_bits(9),
       ubifs_unpack_bits(9), ubifs_pack_pnode(9), ubifs_pack_nnode(9),
       ubifs_pack_ltab(9), ubifs_pack_lsave(9), ubifs_add_lpt_dirt(9),
       set_ltab(9), ubifs_add_nnode_dirt(9), add_pnode_dirt(9),
       calc_nnode_num(9), calc_nnode_num_from_parent(9),
       calc_pnode_num_from_parent(9), ubifs_create_dflt_lpt(9), update_cats(9),
       replace_cats(9), check_lpt_crc(9), check_lpt_type(9), unpack_pnode(9),
       ubifs_unpack_nnode(9), unpack_ltab(9), unpack_lsave(9),
       validate_nnode(9), validate_pnode(9), set_pnode_lnum(9),
       ubifs_read_nnode(9), read_pnode(9), read_ltab(9), read_lsave(9),
       ubifs_get_nnode(9), ubifs_get_pnode(9), ubifs_pnode_lookup(9),
       ubifs_lpt_lookup(9), dirty_cow_nnode(9), dirty_cow_pnode(9),
       ubifs_lpt_lookup_dirty(9), ubifs_lpt_calc_hash(9), lpt_check_hash(9),
       lpt_init_rd(9), lpt_init_wr(9), ubifs_lpt_init(9), struct
       lpt_scan_node(9), scan_get_nnode(9), ubifs_lpt_scan_nolock(9),
       dbg_chk_pnode(9), dbg_check_lpt_nodes(9)

and that's the whole page! source is ./fs/ubifs, date is October 2026, and the page is scan_get_pnode(9). slay, you're now a pnode-getting expert πŸ’…βœ¨ periodt

πŸ“¦ where this page comes from