ubi_find_or_add_av(9)
π¦ ubi_find_or_add_av(9) π¦
okay bestie, welcome to the Kernel API Manual page for ubi_find_or_add_av(9). this is giving kernel-internals main character energy, and we're gonna make it make sense. π
β¨
π NAME π
ubi_find_or_add_avβ searches for a volume in the attaching information, and if it does not exist, adds one. lowkey iconic.
β¨ SYNOPSIS β¨
copy this exactly, bestie β no autocorrect, no vibes-based editing:
struct ubi_ainf_volume * ubi_find_or_add_av (struct ubi_attach_info *ai
, int vol_id , bool *created );
π ARGUMENTS π
aiβ the attaching information. that's the context this whole search is happening in.vol_idβ the requested volume ID. literally the volume you're asking about.createdβ tells you whether the volume has been created or not. status check, periodt.
πΈ DESCRIPTION πΈ
so this function returns a pointer to the new volume description. and if the operation failed? you get an ERR_PTR instead. that's the fail path, no cap. ππ«Ά
π₯ SEE ALSO π₯
go peek at the kernel file and its linked-up besties:
- Kernel file
./drivers/mtd/ubi/attach.cβfind_or_add_av(9) ubi_alloc_aeb(9)ubi_free_aeb(9)add_to_list(9)add_corrupted(9)add_fastmap(9)validate_vid_hdr(9)add_volume(9)ubi_compare_lebs(9)ubi_add_to_av(9)ubi_add_av(9)ubi_find_av(9)ubi_remove_av(9)early_erase_peb(9)ubi_early_get_peb(9)check_corruption(9)scan_peb(9)late_analysis(9)destroy_av(9)destroy_ai(9)scan_all(9)scan_fast(9)ubi_attach(9)self_check_ai(9)
sign-off time: source/version field ./drivers/mtd/ubi, date October 2026, and title ubi_find_or_add_av(9). mwah ππ
π¦ 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