提交 7a4bc156 编写于 作者: D Daniel P. Berrange

Adjust some log levels in udev driver

Most of te VIR_INFO calls in the udev driver are only relevant
to developers so can switch to VIR_DEBUG. Failure to initialize
libpciaccess though is a fatal error

* src/node_device/node_device_udev.c: Adjust log levels
上级 bf6a3825
......@@ -116,7 +116,7 @@ static int udevGetDeviceProperty(struct udev_device *udev_device,
udev_value = udev_device_get_property_value(udev_device, property_key);
if (udev_value == NULL) {
VIR_INFO(_("udev reports device '%s' does not have property '%s'"),
VIR_DEBUG("udev reports device '%s' does not have property '%s'",
udev_device_get_sysname(udev_device), property_key);
ret = PROPERTY_MISSING;
goto out;
......@@ -205,7 +205,7 @@ static int udevGetDeviceSysfsAttr(struct udev_device *udev_device,
udev_value = udev_device_get_sysattr_value(udev_device, attr_name);
if (udev_value == NULL) {
VIR_INFO(_("udev reports device '%s' does not have sysfs attr '%s'"),
VIR_DEBUG("udev reports device '%s' does not have sysfs attr '%s'",
udev_device_get_sysname(udev_device), attr_name);
ret = PROPERTY_MISSING;
goto out;
......@@ -950,7 +950,7 @@ static int udevKludgeStorageType(virNodeDeviceDefPtr def)
{
int ret = -1;
VIR_INFO("Could not find definitive storage type for device "
VIR_DEBUG("Could not find definitive storage type for device "
"with sysfs path '%s', trying to guess it",
def->sysfs_path);
......@@ -963,7 +963,7 @@ static int udevKludgeStorageType(virNodeDeviceDefPtr def)
}
if (ret != 0) {
VIR_INFO("Could not determine storage type for device "
VIR_DEBUG("Could not determine storage type for device "
"with sysfs path '%s'", def->sysfs_path);
} else {
VIR_DEBUG("Found storage type '%s' for device "
......@@ -1062,7 +1062,7 @@ static int udevProcessStorage(struct udev_device *device,
} else if (STREQ(def->caps->data.storage.drive_type, "floppy")) {
ret = udevProcessFloppy(device, def);
} else {
VIR_INFO("Unsupported storage type '%s'",
VIR_DEBUG("Unsupported storage type '%s'",
def->caps->data.storage.drive_type);
goto out;
}
......@@ -1141,7 +1141,7 @@ static int udevGetDeviceType(struct udev_device *device,
goto out;
}
VIR_INFO("Could not determine device type for device "
VIR_DEBUG("Could not determine device type for device "
"with sysfs path '%s'",
udev_device_get_sysname(device));
ret = -1;
......@@ -1209,7 +1209,7 @@ static int udevRemoveOneDevice(struct udev_device *device)
dev->def->name, name);
virNodeDeviceObjRemove(&driverState->devs, dev);
} else {
VIR_INFO("Failed to find device to remove that has udev name '%s'",
VIR_DEBUG("Failed to find device to remove that has udev name '%s'",
name);
ret = -1;
}
......@@ -1237,7 +1237,7 @@ static int udevSetParent(struct udev_device *device,
parent_sysfs_path = udev_device_get_syspath(parent_device);
if (parent_sysfs_path == NULL) {
VIR_INFO("Could not get syspath for parent of '%s'",
VIR_DEBUG("Could not get syspath for parent of '%s'",
udev_device_get_syspath(parent_device));
}
......@@ -1350,7 +1350,7 @@ static int udevProcessDeviceListEntry(struct udev *udev,
if (device != NULL) {
if (udevAddOneDevice(device) != 0) {
VIR_INFO("Failed to create node device for udev device '%s'",
VIR_DEBUG("Failed to create node device for udev device '%s'",
name);
}
ret = 0;
......@@ -1598,7 +1598,7 @@ static int udevDeviceMonitorStartup(int privileged ATTRIBUTE_UNUSED)
if ((pciret = pci_system_init()) != 0) {
char ebuf[256];
VIR_INFO("Failed to initialize libpciaccess: %s",
VIR_ERROR(_("Failed to initialize libpciaccess: %s"),
virStrerror(pciret, ebuf, sizeof ebuf));
ret = -1;
goto out;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册