The language supports specifying 64-bit unsigned values, but the num
field of the token structure is not guaranteed to be 64 bits wide.
Change its type to be unsigned long long, and change the code that
parses numbers to use strtoull() so we can actually accept a 64-bit
value.
This is also true of the value field of the token type. Change it
to unsigned long long as well (and format it as unsigned).
Check the return value of strtoull(), and if the result is out of
range, report an error.
Signed-off-by: Alex Elder <elder@linaro.org>
Message-Id: <20211001232338.769309-23-elder@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Use the list implementation from other projects instead of rolling
custom list operations throughout the codebase.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Allow specifying message type for the tlv support functions to verify
and create the right type of qmi header.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
This initial implementation is capable of generating encoder and decoder
accessors for messages with basic integers, strings, arrays and structs.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>