qmi_decode_basic_elem(9)
qmi_decode_basic_elem π
okay bestie, welcome to the qmi_decode_basic_elem(9) page β yes that's the section 9 kernel API manual, we're in the drivers/soc/qcom part of the tree and honestly it's giving main character energy. sit down, drink some water, let's decode some elements β¨
β¨ NAME β¨
qmi_decode_basic_elem β decodes elements of basic/primary data type π
πΈ SYNOPSIS πΈ
int qmi_decode_basic_elem (void *buf_dst , const void *buf_src , u32
elem_len , u32 elem_size );
like yes, four args, all of them matter, no cap π
π¦ ARGUMENTS π¦
buf_dstβ the buffer where the decoded element goes. it's the destination, the place we're landing, the whole point π«Άbuf_srcβ the buffer holding the elements in QMI wire format. this is where the info currently lives, in its little encoded form πelem_lenβ how many elements we're decoding. like the count, not the size, don't get it twisted πelem_sizeβ the size of a single instance of the element being decoded. one (1) element's worth of bytes, periodt β
π§ DESCRIPTION π§
so this function decodes "elem_len" number of elements β in QMI wire format, each one "elem_size" bytes big β out of the source buffer "buf_src", and stores the decoded versions into the destination buffer "buf_dst". literally that's the whole job π
the elements are of primary data type, which includes u8 - u64 or similar. so like, the basic little guys, not structs, not strings, just the primary types being iconic π
and when it's done, the function returns the number of bytes of decoded information. so you get a size back, bestie, that's your receipt π₯
π RETURN π
on success: the total size of the decoded data elements, in bytes π
on error: a negative errno. so if you see a negative number, that's not a size, that's a warning sign, do not pass go π
π SEE ALSO π
- Kernel file
./drivers/soc/qcom/qmi_encdec.c 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_struct_elem(9)qmi_decode_string_elem(9)find_ei(9)qmi_decode(9)qmi_encode_message(9)qmi_decode_message(9)
like the whole encdec friend group, honestly obsessed π«Άβ¨
aaaand that's the page!! sourced from ./drivers/soc/qcom, dated October 2026 β yeah, the future, we're ahead of schedule π
no cap, go forth and decode responsibly, 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