mirror of
https://git.proxmox.com/git/fwupd
synced 2025-05-21 09:27:55 +00:00
dell-dock: Capture the dock SKU in metadata
Should be helpful in reproducing failure reports.
This commit is contained in:
parent
4a844c3024
commit
a42daefb9e
@ -172,6 +172,22 @@ fu_dell_dock_ec_set_board (FuDevice *device)
|
||||
fu_device_set_summary (device, summary);
|
||||
}
|
||||
|
||||
const gchar *
|
||||
fu_dell_dock_ec_get_module_type (FuDevice *device)
|
||||
{
|
||||
FuDellDockEc *self = FU_DELL_DOCK_EC (device);
|
||||
switch (self->data->module_type) {
|
||||
case MODULE_TYPE_SINGLE:
|
||||
return "WD19";
|
||||
case MODULE_TYPE_DUAL:
|
||||
return "WD19DC";
|
||||
case MODULE_TYPE_TBT:
|
||||
return "WD19TB";
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
gboolean
|
||||
fu_dell_dock_ec_needs_tbt (FuDevice *device)
|
||||
{
|
||||
|
@ -26,6 +26,7 @@ G_DECLARE_FINAL_TYPE (FuDellDockEc, fu_dell_dock_ec, FU, DELL_DOCK_EC, FuDevice)
|
||||
|
||||
FuDellDockEc *fu_dell_dock_ec_new (FuDevice *proxy);
|
||||
|
||||
const gchar *fu_dell_dock_ec_get_module_type (FuDevice *device);
|
||||
gboolean fu_dell_dock_ec_needs_tbt (FuDevice *device);
|
||||
gboolean fu_dell_dock_ec_tbt_passive (FuDevice *device);
|
||||
gboolean fu_dell_dock_ec_modify_lock (FuDevice *self,
|
||||
|
@ -164,6 +164,25 @@ fu_plugin_dell_dock_get_ec (GPtrArray *devices)
|
||||
return ec_parent;
|
||||
}
|
||||
|
||||
gboolean
|
||||
fu_plugin_composite_prepare (FuPlugin *plugin, GPtrArray *devices,
|
||||
GError **error)
|
||||
{
|
||||
FuDevice *parent = fu_plugin_dell_dock_get_ec (devices);
|
||||
const gchar *sku;
|
||||
if (parent == NULL)
|
||||
return TRUE;
|
||||
sku = fu_dell_dock_ec_get_module_type (parent);
|
||||
if (sku == NULL) {
|
||||
g_set_error_literal (error, FWUPD_ERROR, FWUPD_ERROR_INTERNAL,
|
||||
"unable to detect SKU");
|
||||
return FALSE;
|
||||
}
|
||||
fu_plugin_add_report_metadata (plugin, "DellDockSKU", sku);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
fu_plugin_composite_cleanup (FuPlugin *plugin,
|
||||
GPtrArray *devices,
|
||||
|
Loading…
Reference in New Issue
Block a user