34 lines
1.0 KiB
Diff
34 lines
1.0 KiB
Diff
From 0f5572c6ee1847ac6b8d5fa892c83797ac4cbc6f Mon Sep 17 00:00:00 2001
|
|
From: htpeng <htpengc@isoftstone.com>
|
|
Date: Wed, 29 Mar 2023 08:37:46 +0800
|
|
Subject: [PATCH 27/30] Fix for popen() cannot get stderr
|
|
|
|
Signed-off-by: htpeng <htpengc@isoftstone.com>
|
|
---
|
|
src/probes/virtualized_infos.probe/virt_proc.c | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src/probes/virtualized_infos.probe/virt_proc.c b/src/probes/virtualized_infos.probe/virt_proc.c
|
|
index d5972a5..b52c63e 100644
|
|
--- a/src/probes/virtualized_infos.probe/virt_proc.c
|
|
+++ b/src/probes/virtualized_infos.probe/virt_proc.c
|
|
@@ -72,7 +72,7 @@ static int is_virsh_installed(void)
|
|
char line[LINE_BUF_LEN];
|
|
int is_installed = 0;
|
|
|
|
- if (do_read_line("which virsh", line) < 0) {
|
|
+ if (do_read_line("which virsh 2>&1", line) < 0) {
|
|
ERROR("[VIRT_PROC] find virsh failed.\n");
|
|
return -1;
|
|
}
|
|
@@ -199,4 +199,4 @@ int virt_proc_init(void)
|
|
{
|
|
g_host_type_is_pm = 0;
|
|
is_host_type_pm(&g_host_type_is_pm);
|
|
-}
|
|
\ No newline at end of file
|
|
+}
|
|
--
|
|
2.33.0
|
|
|