mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 21:34:54 +03:00
daemon: Portable auto-detection of driver module directory
When running libvirtd from a build directory on a system with unmodified libtool, libvirtd's binary is not renamed as "lt-libvirtd". Check for "/daemon/.libs/libvirtd" in addition to "lt-libvirtd".
This commit is contained in:
parent
d3084c2a24
commit
b5c5ad365e
@ -972,7 +972,8 @@ int main(int argc, char **argv) {
|
||||
virLogSetFromEnv();
|
||||
|
||||
#ifdef WITH_DRIVER_MODULES
|
||||
if (strstr(argv[0], "lt-libvirtd")) {
|
||||
if (strstr(argv[0], "lt-libvirtd") ||
|
||||
strstr(argv[0], "/daemon/.libs/libvirtd")) {
|
||||
char *tmp = strrchr(argv[0], '/');
|
||||
if (!tmp) {
|
||||
fprintf(stderr, _("%s: cannot identify driver directory\n"), argv[0]);
|
||||
|
Loading…
Reference in New Issue
Block a user