STRUCT UBIFS_BRANCH(9)
π 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β¦ withinlnumπ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
- 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