提交 b5c5ad36 编写于 作者: J Jiri Denemark

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".
上级 d3084c2a
...@@ -972,7 +972,8 @@ int main(int argc, char **argv) { ...@@ -972,7 +972,8 @@ int main(int argc, char **argv) {
virLogSetFromEnv(); virLogSetFromEnv();
#ifdef WITH_DRIVER_MODULES #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], '/'); char *tmp = strrchr(argv[0], '/');
if (!tmp) { if (!tmp) {
fprintf(stderr, _("%s: cannot identify driver directory\n"), argv[0]); fprintf(stderr, _("%s: cannot identify driver directory\n"), argv[0]);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册