qmi_encode_message(9)
π qmi_encode_message(9) β like, the Kernel API Manual, bestie β¨
okay so picture this: you're deep in the kernel, you've got a C struct in your hands, and you need it to become a QMI encoded message. That's it. That's the whole vibe. Welcome to qmi_encode_message π
β¨ NAME β¨
qmi_encode_message β encode a C structure as a QMI encoded message π¦
πΈ SYNOPSIS πΈ
void * qmi_encode_message (int type , unsigned int msg_id , size_t *len
, unsigned int txn_id , const struct qmi_elem_info *ei , const void
*c_struct );
π ARGUMENTS π
typeβ the type of QMI message π like, which flavour we're dealing withmsg_idβ the message ID of the message, iykyk π·οΈlenβ you pass this in as the max length of the message, and it comes back updated to the actual size. she's doing double duty, lowkey iconic πtxn_idβ the transaction ID, no cap π₯eiβ the QMI message descriptor π§ literally the map for the whole encodec_structβ reference to the structure you wanna encode π
β RETURN β
A buffer with the encoded message π or, if it goes sideways, a negative ERR_PTR on error π fr fr check that pointer.
bestie please: negative ERR_PTR means error, not "a slightly smaller buffer". vibe check your return values π
π¦ SEE ALSO π¦
kernel file ./drivers/soc/qcom/qmi_encdec.c plus the whole friend group: 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_decode(9), qmi_decode_message(9) πΈ
and that's the page!! π«Ά brought to you from ./drivers/soc/qcom, dated October 2026, in the qmi_encode_message(9) edition β slay, go encode something πβ¨π
π¦ 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