pci: do not probe PCI topology on Solaris unless effective uid is root
Otherwise libpciaccess sends a big error message to stderr: Error opening /devices/pci@0,0:reg: Permission denied (cherry picked from commit open-mpi/hwloc@d93c7c0960)
Этот коммит содержится в:
родитель
12bd300c40
Коммит
2ac09d5a8d
@ -1,8 +1,10 @@
|
||||
/*
|
||||
* Copyright © 2009 CNRS
|
||||
* Copyright © 2009-2014 Inria. All rights reserved.
|
||||
* Copyright © 2009-2015 Inria. All rights reserved.
|
||||
* Copyright © 2009-2011, 2013 Université Bordeaux
|
||||
* Copyright © 2014 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright © 2015 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* See COPYING in top-level directory.
|
||||
*/
|
||||
|
||||
@ -305,7 +307,12 @@ hwloc_pci_component_instantiate(struct hwloc_disc_component *component,
|
||||
if (!backend)
|
||||
return NULL;
|
||||
backend->flags = HWLOC_BACKEND_FLAG_NEED_LEVELS;
|
||||
backend->discover = hwloc_look_pci;
|
||||
#ifdef HWLOC_SOLARIS_SYS
|
||||
if ((uid_t)0 != geteuid())
|
||||
backend->discover = NULL;
|
||||
else
|
||||
#endif
|
||||
backend->discover = hwloc_look_pci;
|
||||
return backend;
|
||||
}
|
||||
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user