[PATCH] Fix usage of open()
From: Jian Wen
Date: Tue Nov 09 2021 - 03:01:02 EST
O_NONBLOCK is a flag instead of a file mode bit.
Fixes: edcaa47958c7 ("perf daemon: Add 'ping' command")
Signed-off-by: Jian Wen <wenjianhn@xxxxxxxxx>
---
tools/perf/builtin-daemon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/builtin-daemon.c b/tools/perf/builtin-daemon.c
index 6cb3f6cc36d0..37d6fcdbb63d 100644
--- a/tools/perf/builtin-daemon.c
+++ b/tools/perf/builtin-daemon.c
@@ -531,7 +531,7 @@ static int daemon_session__control(struct daemon_session *session,
scnprintf(ack_path, sizeof(ack_path), "%s/%s",
session->base, SESSION_ACK);
- ack = open(ack_path, O_RDONLY, O_NONBLOCK);
+ ack = open(ack_path, O_RDONLY|O_NONBLOCK);
if (!ack) {
close(control);
return -1;
--
2.25.1