modem-manager: use version format from metadata

Some modems use a plain string as version while others use a
standardized version format. If such a format is provided by
the metadata, set it.
This commit is contained in:
Dylan Van Assche 2022-01-30 17:08:08 +01:00 committed by Richard Hughes
parent e742e4fc10
commit b5077745a7

View File

@ -1624,6 +1624,7 @@ fu_mm_device_init(FuMmDevice *self)
fu_device_add_flag(FU_DEVICE(self), FWUPD_DEVICE_FLAG_USE_RUNTIME_VERSION); fu_device_add_flag(FU_DEVICE(self), FWUPD_DEVICE_FLAG_USE_RUNTIME_VERSION);
fu_device_add_flag(FU_DEVICE(self), FWUPD_DEVICE_FLAG_REQUIRE_AC); fu_device_add_flag(FU_DEVICE(self), FWUPD_DEVICE_FLAG_REQUIRE_AC);
fu_device_add_internal_flag(FU_DEVICE(self), FU_DEVICE_INTERNAL_FLAG_REPLUG_MATCH_GUID); fu_device_add_internal_flag(FU_DEVICE(self), FU_DEVICE_INTERNAL_FLAG_REPLUG_MATCH_GUID);
fu_device_add_internal_flag(FU_DEVICE(self), FU_DEVICE_INTERNAL_FLAG_MD_SET_VERFMT);
fu_device_set_version_format(FU_DEVICE(self), FWUPD_VERSION_FORMAT_PLAIN); fu_device_set_version_format(FU_DEVICE(self), FWUPD_VERSION_FORMAT_PLAIN);
fu_device_set_summary(FU_DEVICE(self), "Mobile broadband device"); fu_device_set_summary(FU_DEVICE(self), "Mobile broadband device");
fu_device_add_icon(FU_DEVICE(self), "network-modem"); fu_device_add_icon(FU_DEVICE(self), "network-modem");