mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-15 17:39:37 +00:00
trivial: Use unique profiling IDs in plugins
This commit is contained in:
parent
99b317d4f7
commit
561c457149
@ -127,7 +127,7 @@ fu_plugin_dfu_device_added_cb (DfuContext *ctx,
|
|||||||
g_autoptr(GError) error = NULL;
|
g_autoptr(GError) error = NULL;
|
||||||
|
|
||||||
platform_id = dfu_device_get_platform_id (device);
|
platform_id = dfu_device_get_platform_id (device);
|
||||||
ptask = as_profile_start (profile, "FuPlugin:added{%s} [%04x:%04x]",
|
ptask = as_profile_start (profile, "FuPluginDfu:added{%s} [%04x:%04x]",
|
||||||
platform_id,
|
platform_id,
|
||||||
dfu_device_get_runtime_vid (device),
|
dfu_device_get_runtime_vid (device),
|
||||||
dfu_device_get_runtime_pid (device));
|
dfu_device_get_runtime_pid (device));
|
||||||
|
@ -47,7 +47,7 @@ fu_plugin_ebitdo_device_added (FuPlugin *plugin,
|
|||||||
g_autofree gchar *name = NULL;
|
g_autofree gchar *name = NULL;
|
||||||
|
|
||||||
/* ignore hubs */
|
/* ignore hubs */
|
||||||
ptask = as_profile_start (profile, "FuPlugin:added{%04x:%04x}",
|
ptask = as_profile_start (profile, "FuPluginEbitdo:added{%04x:%04x}",
|
||||||
g_usb_device_get_vid (usb_device),
|
g_usb_device_get_vid (usb_device),
|
||||||
g_usb_device_get_pid (usb_device));
|
g_usb_device_get_pid (usb_device));
|
||||||
g_assert (ptask != NULL);
|
g_assert (ptask != NULL);
|
||||||
|
@ -53,7 +53,7 @@ fu_plugin_steelseries_device_added_cb (GUsbContext *ctx,
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
/* profile */
|
/* profile */
|
||||||
ptask = as_profile_start (profile, "FuPlugin:added{%04x:%04x}",
|
ptask = as_profile_start (profile, "FuPluginSteelseries:added{%04x:%04x}",
|
||||||
g_usb_device_get_vid (usb_device),
|
g_usb_device_get_vid (usb_device),
|
||||||
g_usb_device_get_pid (usb_device));
|
g_usb_device_get_pid (usb_device));
|
||||||
g_assert (ptask != NULL);
|
g_assert (ptask != NULL);
|
||||||
|
@ -129,7 +129,7 @@ fu_plugin_client_add (FuPlugin *plugin, GUdevDevice *device)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
/* get data */
|
/* get data */
|
||||||
ptask = as_profile_start (profile, "FuPlugin:client-add{%s}", guid);
|
ptask = as_profile_start (profile, "FuPluginUdev:client-add{%s}", guid);
|
||||||
g_assert (ptask != NULL);
|
g_assert (ptask != NULL);
|
||||||
g_debug ("adding udev device: %s", g_udev_device_get_sysfs_path (device));
|
g_debug ("adding udev device: %s", g_udev_device_get_sysfs_path (device));
|
||||||
|
|
||||||
@ -246,7 +246,7 @@ fu_plugin_coldplug (FuPlugin *plugin, GError **error)
|
|||||||
/* get all devices of class */
|
/* get all devices of class */
|
||||||
for (guint i = 0; devclass[i] != NULL; i++) {
|
for (guint i = 0; devclass[i] != NULL; i++) {
|
||||||
g_autoptr(AsProfileTask) ptask = NULL;
|
g_autoptr(AsProfileTask) ptask = NULL;
|
||||||
ptask = as_profile_start (profile, "FuPlugin:coldplug{%s}", devclass[i]);
|
ptask = as_profile_start (profile, "FuPluginUdev:coldplug{%s}", devclass[i]);
|
||||||
g_assert (ptask != NULL);
|
g_assert (ptask != NULL);
|
||||||
devices = g_udev_client_query_by_subsystem (data->gudev_client,
|
devices = g_udev_client_query_by_subsystem (data->gudev_client,
|
||||||
devclass[i]);
|
devclass[i]);
|
||||||
|
@ -44,7 +44,7 @@ fu_plugin_unifying_device_added (FuPlugin *plugin,
|
|||||||
g_autoptr(UnifyingDongle) dongle = NULL;
|
g_autoptr(UnifyingDongle) dongle = NULL;
|
||||||
|
|
||||||
/* profile */
|
/* profile */
|
||||||
ptask = as_profile_start (profile, "FuPlugin:added{%04x:%04x}",
|
ptask = as_profile_start (profile, "FuPluginUnifying:added{%04x:%04x}",
|
||||||
g_usb_device_get_vid (usb_device),
|
g_usb_device_get_vid (usb_device),
|
||||||
g_usb_device_get_pid (usb_device));
|
g_usb_device_get_pid (usb_device));
|
||||||
g_assert (ptask != NULL);
|
g_assert (ptask != NULL);
|
||||||
|
@ -43,7 +43,7 @@ fu_plugin_usb_device_added (FuPlugin *plugin, GUsbDevice *device)
|
|||||||
/* ignore hubs */
|
/* ignore hubs */
|
||||||
if (g_usb_device_get_device_class (device) == G_USB_DEVICE_CLASS_HUB)
|
if (g_usb_device_get_device_class (device) == G_USB_DEVICE_CLASS_HUB)
|
||||||
return;
|
return;
|
||||||
ptask = as_profile_start (profile, "FuPlugin:added{%04x:%04x}",
|
ptask = as_profile_start (profile, "FuPluginUsb:added{%04x:%04x}",
|
||||||
g_usb_device_get_vid (device),
|
g_usb_device_get_vid (device),
|
||||||
g_usb_device_get_pid (device));
|
g_usb_device_get_pid (device));
|
||||||
g_assert (ptask != NULL);
|
g_assert (ptask != NULL);
|
||||||
@ -70,7 +70,7 @@ fu_plugin_usb_device_added (FuPlugin *plugin, GUsbDevice *device)
|
|||||||
idx = g_usb_device_get_product_index (device);
|
idx = g_usb_device_get_product_index (device);
|
||||||
if (idx != 0x00) {
|
if (idx != 0x00) {
|
||||||
g_autoptr(AsProfileTask) ptask2 = NULL;
|
g_autoptr(AsProfileTask) ptask2 = NULL;
|
||||||
ptask2 = as_profile_start_literal (profile, "FuPlugin:get-string-desc");
|
ptask2 = as_profile_start_literal (profile, "FuPluginUsb:get-string-desc");
|
||||||
g_assert (ptask2 != NULL);
|
g_assert (ptask2 != NULL);
|
||||||
product = g_usb_device_get_string_descriptor (device, idx, NULL);
|
product = g_usb_device_get_string_descriptor (device, idx, NULL);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user