es58x_parse_sw_version(9)
π es58x_parse_sw_version(9) π
okay so bestie, this one's from the Kernel API Manual and it's literally about digging the version numbers out of a USB string. buckle up π
β¨ NAME β¨
es58x_parse_sw_version β extracts the boot loader or firmware version, that's the whole gig π
π¦ SYNOPSIS π¦
int es58x_parse_sw_version (struct es58x_device *es58x_dev , const char
*prod_info , const char *prefix );
yeah it takes three things and gives you back an int, no cap β¨
πΈ ARGUMENTS πΈ
es58x_devβ your ES58X device, the main character of this whole function π«Άprod_infoβ the USB custom string that the device itself hands back to you, like a lil note it wroteprefixβ this one picks which info gets parsed. set it to"FW"for the firmware version, or to"BL"for the bootloader version. that's it, that's the switch π
π DESCRIPTION π
so the prod_info string is lowkey a little soup π β it's got the firmware version and the bootloader version in there, all prefixed by a magic string and concatenated with other numbers. it's giving chaos but it's fine.
depending on the device, the firmware (bootloader) format is either:
"FW_Vxx.xx.xx"(or"BL_Vxx.xx.xx")"FW:xx.xx.xx"(or"BL:xx.xx.xx")
where x is a digit, obviously π
and prod_info must contain the common part of those prefixes: "FW" or "BL". like, the actual shared bit, not the whole fancy thing.
then it parses prod_info and stores the version number in es58x_dev.firmware_version or es58x_dev.bootloader_version β which one depends on the prefix value you passed in. iconic behaviour, honestly π
π₯ RETURN π₯
zeroon success β slay, we got it π-EINVALifprefixcontains an invalid value β bestie, you sent the wrong word π-EBADMSGifprod_infocould not be parsed β the string said nope π
π SEE ALSO π
- Kernel file
./drivers/net/can/usb/etas_es58x/es58x_devlink.c es58x_parse_hw_rev(9)es58x_parse_product_info(9)es58x_sw_version_is_valid(9)es58x_hw_revision_is_valid(9)es58x_devlink_info_get(9)
go read the whole friend group, they're all connected fr fr π§
ngl if you're calling this and ignoring the return value, the version might just silently stay stale. vibe check your error handling, bestie π
mwah π that's the whole page! brought to you from ./drivers/net/can/usb/etas_es58x, dated October 2026 β catch you in the next manpage, bestie! πβ¨π¦
π¦ 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