qmi_decode(9)
π qmi_decode(9) β the Kernel API Manual, bestie edition π
okay so real talk, this whole page is about qmi_decode, and yes it lives in the Kernel API Manual β that's the manual name, iykyk. It's the core decode function, the main character of the QMI encdec world. Let's get into it β¨
πΈ NAME πΈ
qmi_decode β the Core Decode Function. that's literally it, that's the whole vibe. she decodes. she's core. periodt π
π¦ SYNOPSIS π¦
int qmi_decode (const struct qmi_elem_info *ei_array , void
*out_c_struct , const void *in_buf , u32 in_buf_len , int dec_level );
like, copy that exactly pls, no cap, every character matters π
β¨ ARGUMENTS β¨
ei_arrayβ the struct info array that describes the structure you're decoding. it's giving "here's the map, now go find the treasure" πΊοΈout_c_structβ the buffer that holds the decoded C struct. this is where the decoded goods land πin_bufβ the buffer containing the QMI message to be decoded. the raw material, the input, the main character's origin story πin_buf_lenβ length of the QMI message to be decoded. gotta know how much you're working with fr fr πdec_levelβ the decode level, which indicates the depth of the nested structure (within the main structure) that's being decoded. yes, it's recursion-coded and we respect it π§
π₯ RETURN π₯
on success you get the number of bytes of decoded information. on error you get a negative errno. so like, if the number is negative, something went sideways, bestie π β check that return value, don't just vibe past it π
π SEE ALSO π
the kernel file lives at ./drivers/soc/qcom/qmi_encdec.c, and honestly the whole friend group shows up here:
skip_to_next_elem(9)qmi_calc_min_msg_len(9)qmi_encode_basic_elem(9)qmi_encode_struct_elem(9)qmi_encode_string_elem(9)qmi_encode(9)qmi_decode_basic_elem(9)qmi_decode_struct_elem(9)qmi_decode_string_elem(9)find_ei(9)qmi_encode_message(9)qmi_decode_message(9)
the encode girlies AND the decode girlies, all in one list. obsessed π«Ά
ngl the whole friend group ate and left no crumbs β go read the encode ones too, they're the mirror of this whole operation π
and that's the page! brought to you by ./drivers/soc/qcom, stamped October 2026, and signed qmi_decode(9) β mwah, study hard, slay harder πβ¨ππ¦
π¦ 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