[lttng-dev] [PATCH babeltrace 2/3] Port: Use glib g_mkdir

Michael Jeanson mjeanson at efficios.com
Thu Sep 15 16:14:42 UTC 2016


Signed-off-by: Michael Jeanson <mjeanson at efficios.com>
---
 converter/babeltrace-log.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/converter/babeltrace-log.c b/converter/babeltrace-log.c
index 8cb35d1..3de2dbc 100644
--- a/converter/babeltrace-log.c
+++ b/converter/babeltrace-log.c
@@ -38,6 +38,8 @@
 #include <errno.h>
 #include <string.h>
 #include <inttypes.h>
+#include <glib.h>
+#include <glib/gstdio.h>
 
 #include <babeltrace/babeltrace-internal.h>
 #include <babeltrace/ctf/types.h>
@@ -401,9 +403,9 @@ int main(int argc, char **argv)
 		exit(EXIT_SUCCESS);
 	}
 
-	ret = mkdir(s_outputname, S_IRWXU|S_IRWXG);
+	ret = g_mkdir(s_outputname, S_IRWXU|S_IRWXG);
 	if (ret) {
-		perror("mkdir");
+		perror("g_mkdir");
 		goto error;
 	}
 
-- 
2.7.4



More information about the lttng-dev mailing list