nodedev: improve debugging logs from udev device/event processing

Reviewed-by: Laine Stump <laine@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé 2020-11-17 11:54:54 +00:00
parent 1441ce83fe
commit f4b4bfdf41

View File

@ -141,8 +141,9 @@ udevGetDeviceProperty(struct udev_device *udev_device,
ret = udev_device_get_property_value(udev_device, property_key);
VIR_DEBUG("Found property key '%s' value '%s' for device with sysname '%s'",
property_key, NULLSTR(ret), udev_device_get_sysname(udev_device));
VIR_DEBUG("Found property key '%s' value '%s' for device with sysname '%s' errno='%s'",
property_key, NULLSTR(ret), udev_device_get_sysname(udev_device),
ret ? "" : g_strerror(errno));
return ret;
}
@ -1609,7 +1610,7 @@ udevHandleOneDevice(struct udev_device *device)
{
const char *action = udev_device_get_action(device);
VIR_DEBUG("udev action: '%s'", action);
VIR_DEBUG("udev action: '%s': %s", action, udev_device_get_syspath(device));
if (STREQ(action, "add") || STREQ(action, "change"))
return udevAddOneDevice(device);