Commit 2f5932ed authored by Richard Hughes's avatar Richard Hughes
Browse files

Log a warning if a device is added that is updatable by any vendor

Plugins should have calls to fu_device_set_vendor_id() to lock the device down
to one specific vendor. This vendor ID should match the ID set on the LVFS.
parent 5cc168fa
......@@ -2564,6 +2564,14 @@ fu_engine_add_device (FuEngine *self, FuPlugin *plugin, FuDevice *device)
if (!fu_device_has_flag (device, FWUPD_DEVICE_FLAG_REGISTERED))
fu_engine_plugin_device_register (self, device);
/* warn if the device is updatable by any vendor */
if (fu_device_has_flag (device, FWUPD_DEVICE_FLAG_UPDATABLE) &&
fu_device_get_vendor_id (device) == 0) {
g_warning ("device %s [%s] is updatable by any vendor",
fu_device_get_id (device),
fu_device_get_name (device));
/* create new device */
item = g_new0 (FuDeviceItem, 1);
item->device = g_object_ref (device);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment