Fix: put explicit error messages and warnings when opening a trace
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 11 Apr 2012 21:20:19 +0000 (17:20 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 11 Apr 2012 21:20:19 +0000 (17:20 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
formats/ctf/ctf.c

index ad218c0f3aeb5a5f50ca4c34bb5d1d0451a7f11f..15dd3f1e07ab2691379539a72f6261867b8a3374 100644 (file)
@@ -1426,14 +1426,14 @@ int ctf_open_trace_read(struct ctf_trace *td,
        /* Open trace directory */
        td->dir = opendir(path);
        if (!td->dir) {
-               fprintf(stderr, "[error] Unable to open trace directory.\n");
+               fprintf(stderr, "[error] Unable to open trace directory \"%s\".\n", path);
                ret = -ENOENT;
                goto error;
        }
 
        td->dirfd = open(path, 0);
        if (td->dirfd < 0) {
-               fprintf(stderr, "[error] Unable to open trace directory file descriptor.\n");
+               fprintf(stderr, "[error] Unable to open trace directory file descriptor for path \"%s\".\n", path);
                perror("Trace directory open");
                ret = -errno;
                goto error_dirfd;
@@ -1447,6 +1447,7 @@ int ctf_open_trace_read(struct ctf_trace *td,
 
        ret = ctf_open_trace_metadata_read(td, packet_seek, metadata_fp);
        if (ret) {
+               fprintf(stderr, "[warning] Unable to open trace metadata for path \"%s\".\n", path);
                goto error_metadata;
        }
 
This page took 0.034611 seconds and 4 git commands to generate.