Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(274)

Unified Diff: chrome/gpu/gpu_info_collector_linux.cc

Issue 6592057: Be more flexible about PCI lib path: try both libpci.so.3 and libpci.so. So ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: For the records Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/gpu/gpu_info_collector_linux.cc
===================================================================
--- chrome/gpu/gpu_info_collector_linux.cc (revision 74622)
+++ chrome/gpu/gpu_info_collector_linux.cc (working copy)
@@ -83,7 +83,7 @@
PciInterface* InitializeLibPci(const char* lib_name) {
void* handle = dlopen(lib_name, RTLD_LAZY);
if (handle == NULL) {
- LOG(ERROR) << "Fail to dlopen libpci";
+ LOG(INFO) << "Failed to dlopen " << lib_name;
return NULL;
}
PciInterface* interface = new struct PciInterface;
@@ -106,7 +106,7 @@
interface->pci_scan_bus == NULL ||
interface->pci_fill_info == NULL ||
interface->pci_lookup_name == NULL) {
- LOG(ERROR) << "Missing required function(s) from libpci";
+ LOG(ERROR) << "Missing required function(s) from " << lib_name;
dlclose(handle);
delete interface;
return NULL;
@@ -143,7 +143,11 @@
// TODO(zmo): be more flexible about library name.
PciInterface* interface = InitializeLibPci("libpci.so.3");
if (interface == NULL)
+ interface = InitializeLibPci("libpci.so");
+ if (interface == NULL) {
+ LOG(ERROR) << "Failed to locate libpci";
return false;
+ }
PciAccess* access = (interface->pci_alloc)();
DCHECK(access != NULL);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698