[PATCH] libtracefs: Fix wrong return value in tracefs_tracing_dir_is_mounted()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Bean Huo <beanhuo@xxxxxxxxxx>

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@xxxxxxxxxx>
---
 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




[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux