linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] libtracefs: Fix wrong return value in tracefs_tracing_dir_is_mounted()
@ 2022-11-28 13:21 Bean Huo
  2022-11-28 15:24 ` Steven Rostedt
  0 siblings, 1 reply; 7+ messages in thread
From: Bean Huo @ 2022-11-28 13:21 UTC (permalink / raw)
  To: linux-trace-devel, rostedt, tz.stoyanov; +Cc: Bean Huo

From: Bean Huo <beanhuo@micron.com>

If it eventually mounts successfully, it should return 1 instead of
0, otherwise it will make the caller's verification logic more complicated

Signed-off-by: Bean Huo <beanhuo@micron.com>
---
 src/tracefs-utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/tracefs-utils.c b/src/tracefs-utils.c
index 777912e..5d6e977 100644
--- a/src/tracefs-utils.c
+++ b/src/tracefs-utils.c
@@ -188,7 +188,7 @@ int tracefs_tracing_dir_is_mounted(bool mount, const char **path)
 		return -1;
 	if (path)
 		*path = dir;
-	return 0;
+	return 1;
 }
 
 /**
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-12-08 12:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-28 13:21 [PATCH] libtracefs: Fix wrong return value in tracefs_tracing_dir_is_mounted() Bean Huo
2022-11-28 15:24 ` Steven Rostedt
2022-11-28 15:41   ` Bean Huo
2022-11-28 16:29     ` Bean Huo
2022-11-28 18:37     ` Steven Rostedt
2022-12-06 21:13       ` Steven Rostedt
2022-12-08 12:05         ` Bean Huo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).