STRUCT UBIFS_BRANCH(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct ubifs_branch(9) β€” the Kernel API Manual, bestie edition ✨

okay so this is a page straight out of the Kernel API Manual and it's literally about struct ubifs_branch β€” the key/reference/length branch of the UBIFS world πŸ‘‘ tiny struct, big main character energy.


✨ NAME ✨

struct ubifs_branch β€” it's giving key/reference/length branch πŸŽ€ that's the whole vibe, no cap.


🌸 SYNOPSIS 🌸

like, here's the literal glow-up of the struct, copy it exactly please 🫢

struct ubifs_branch {
    __le32 lnum;
    __le32 offs;
    __le32 len;
    __u8 key[];
};

πŸ’– Members πŸ’–

bestie these are the members, do not lose a single one:

  • lnum β€” the LEB number of the target node πŸ”₯ (yes, that LEB)
  • offs β€” the offset, but like… within lnum πŸ“
  • len β€” the target node length, periodt πŸ’…
  • key β€” the key πŸ—οΈ literally just the key

πŸ¦‹ Description πŸ¦‹

so in an authenticated UBIFS we have the hash of the referenced node sitting after key πŸ‘€ β€” and the way that this can't be added to the struct type definition is because key is already a dynamically sized element 😭 like it's fully booked, no room, the audacity.


🌈 SEE ALSO 🌈

the whole friend group, all from the kernel file ./fs/ubifs/ubifs-media.h:

  • struct ubifs_ch(9)
  • union ubifs_dev_desc(9)
  • struct ubifs_ino_node(9)
  • struct ubifs_dent_node(9)
  • struct ubifs_data_node(9)
  • struct ubifs_trun_node(9)
  • struct ubifs_pad_node(9)
  • struct ubifs_sb_node(9)
  • struct ubifs_mst_node(9)
  • struct ubifs_ref_node(9)
  • struct ubifs_auth_node(9)
  • struct ubifs_sig_node(9)
  • struct ubifs_idx_node(9)
  • struct ubifs_cs_node(9)
  • struct ubifs_orph_node(9)

like, that's the entire squad 🫢✨


aaaand that's the page, diva πŸ’œ sign-off time: this lil gem lives at ./fs/ubifs, dated October 2026, and it's filed under struct ubifs_branch(9) β€” slay, go read the source, iykyk πŸŒΈπŸŽ€

πŸ“¦ where this page comes from