first_non_ff(9)
π first_non_ff(9) β like, the Kernel API Manual entry, bestie β¨
Okay so picture this: you're deep in the Kernel API Manual (yes, that one, the first_non_ff(9) page), and you just need to know where the first non-0xff byte is hiding. That's it. That's the whole plot. π
πΈ NAME πΈ
first_non_ff β find the offset of the first non-0xff byte. literally its whole job, no notes π
β¨ SYNOPSIS β¨
int first_non_ff (void *buf , int len );
π¦ ARGUMENTS π¦
bufβ the buffer you're searching in, bestie. hand it over πlenβ how long that buffer is. gotta know where to stop looking fr fr
π DESCRIPTION π
So this function returns the offset of the first non-0xff byte inside buf π«Ά
And if the buffer is literally all 0xff bytes β like every single one, no survivors β it comes back with -1 instead. that's the vibe check failing, basically π
π SEE ALSO π
Kernel file ./fs/ubifs/recovery.c is, like, the whole friend group here β every single one of these icons:
is_empty(9)get_master_node(9)write_rcvrd_mst_node(9)ubifs_recover_master_node(9)ubifs_write_rcvrd_mst_node(9)is_last_write(9)clean_buf(9)no_more_nodes(9)fix_unclean_leb(9)drop_last_group(9)drop_last_node(9)ubifs_recover_leb(9)get_cs_sqnum(9)ubifs_recover_log_leb(9)recover_head(9)ubifs_recover_inl_heads(9)clean_an_unclean_leb(9)ubifs_clean_lebs(9)grab_empty_leb(9)ubifs_rcvry_gc_commit(9)struct size_entry(9)add_ino(9)find_ino(9)remove_ino(9)ubifs_destroy_size_tree(9)ubifs_recover_size_accum(9)fix_size_in_place(9)inode_fix_size(9)ubifs_recover_size(9)
like go read them?? they're right there?? ππ
okay that's the page, ily, go forth and scan your buffers π§
sign-off szn: this lil masterpiece lives in ./fs/ubifs, and it's dated October 2026 β yes, that October 2026 πΈ periodt.
π¦ 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