diff --git a/plugins/synapticsmst/fu-plugin-synapticsmst.c b/plugins/synapticsmst/fu-plugin-synapticsmst.c index c830472f2..656aa44cc 100644 --- a/plugins/synapticsmst/fu-plugin-synapticsmst.c +++ b/plugins/synapticsmst/fu-plugin-synapticsmst.c @@ -259,7 +259,7 @@ fu_plugin_synapticsmst_enumerate (FuPlugin *plugin, /* If we open succesfully a device exists here */ device = synapticsmst_device_new (SYNAPTICSMST_DEVICE_KIND_DIRECT, aux_node, 0, 0); - if (!synapticsmst_device_open (device, NULL)) { + if (!synapticsmst_device_open (device, &error_local)) { /* No device exists here, but was there - remove from DB */ if (fu_dev != NULL) { g_debug ("Removing devices on %s", aux_node); @@ -269,7 +269,8 @@ fu_plugin_synapticsmst_enumerate (FuPlugin *plugin, aux_node); } else { /* Nothing to see here - move on*/ - g_debug ("No device found on %s", aux_node); + g_debug ("No device found on %s: %s", aux_node, error_local->message); + g_clear_error (&error_local); } continue; } diff --git a/plugins/synapticsmst/synapticsmst-device.c b/plugins/synapticsmst/synapticsmst-device.c index d691ecead..d164325e5 100644 --- a/plugins/synapticsmst/synapticsmst-device.c +++ b/plugins/synapticsmst/synapticsmst-device.c @@ -23,6 +23,7 @@ #include "config.h" #include +#include #include #include #include @@ -174,9 +175,9 @@ synapticsmst_device_enable_remote_control (SynapticsMSTDevice *device, GError ** if (priv->fd == -1) { g_set_error (error, G_IO_ERROR, - G_IO_ERROR_PERMISSION_DENIED, - "cannot open device %s", - filename); + g_io_error_from_errno (errno), + "cannot open device %s: %s", + filename, g_strerror (errno)); return FALSE; } return TRUE; @@ -786,9 +787,9 @@ synapticsmst_device_open (SynapticsMSTDevice *device, GError **error) if (priv->fd == -1) { g_set_error (error, G_IO_ERROR, - G_IO_ERROR_PERMISSION_DENIED, - "cannot open device %s", - filename); + g_io_error_from_errno (errno), + "cannot open device %s: %s", + filename, g_strerror (errno)); return FALSE; }