summaryrefslogtreecommitdiffstats
path: root/device/hid/hid_service_linux.cc
diff options
context:
space:
mode:
authorreillyg@chromium.org <reillyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-20 12:54:24 +0000
committerreillyg@chromium.org <reillyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-20 12:54:24 +0000
commit645947ef62a7322feb69334e5db0afd68e809328 (patch)
tree6e56c719523c5510d2eeb5c2da8eb6644547177d /device/hid/hid_service_linux.cc
parent578562213f5b17a6da6c3fac8d062ff86424e560 (diff)
downloadchromium_src-645947ef62a7322feb69334e5db0afd68e809328.zip
chromium_src-645947ef62a7322feb69334e5db0afd68e809328.tar.gz
chromium_src-645947ef62a7322feb69334e5db0afd68e809328.tar.bz2
Descriptive log for HID device open failure on Linux.
Log a human readable message describing the reason why Chromium failed to open a HID device node on Linux instead of the base::File error code. BUG= Review URL: https://codereview.chromium.org/339503007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278684 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'device/hid/hid_service_linux.cc')
-rw-r--r--device/hid/hid_service_linux.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/device/hid/hid_service_linux.cc b/device/hid/hid_service_linux.cc
index 5f9f0dc..5257dcd 100644
--- a/device/hid/hid_service_linux.cc
+++ b/device/hid/hid_service_linux.cc
@@ -114,7 +114,7 @@ void HidServiceLinux::OnDeviceAdded(udev_device* device) {
std::string dev_node;
if (!FindHidrawDevNode(device, &dev_node)) {
- LOG(ERROR) << "Cannot open HID device as hidraw device.";
+ LOG(ERROR) << "Cannot find device node for HID device.";
return;
}
@@ -122,7 +122,8 @@ void HidServiceLinux::OnDeviceAdded(udev_device* device) {
base::File device_file(base::FilePath(dev_node), flags);
if (!device_file.IsValid()) {
- LOG(ERROR) << device_file.error_details();
+ LOG(ERROR) << "Cannot open '" << dev_node << "': "
+ << base::File::ErrorToString(device_file.error_details());
return;
}