X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-relayd%2Findex-file.c;fp=src%2Fbin%2Flttng-relayd%2Findex-file.c;h=4a69f39bc0d670f7e9f60c4dc6a946336838e658;hp=04dac4068aafeb8490a8717398d3672bbb95901b;hb=9e3d760f2bf927be2c59d0ccb3b64e2663ae7263;hpb=f5a2cd657eb3a81a8788438d796e906148a1b3b1 diff --git a/src/bin/lttng-relayd/index-file.c b/src/bin/lttng-relayd/index-file.c index 04dac4068..4a69f39bc 100644 --- a/src/bin/lttng-relayd/index-file.c +++ b/src/bin/lttng-relayd/index-file.c @@ -65,8 +65,9 @@ int unlink_through_handle(const char *path) DBG("Unlinking index at %s through a filesystem handle", path); handle = fd_tracker_open_fs_handle(the_fd_tracker, path, flags, NULL); if (!handle) { - /* There is nothing to do. */ - DBG("File %s does not exist, ignoring unlink", path); + if (errno == ENOENT) { + DBG("File %s does not exist, ignoring unlink", path); + } goto end; } @@ -151,12 +152,14 @@ struct relay_index_file *relay_index_file_create(const char *path_name, fs_handle = fd_tracker_open_fs_handle(the_fd_tracker, idx_file_path, flags, &mode); if (!fs_handle) { + PERROR("Failed to open index file at %s", idx_file_path); goto error; } index_file->handle = fs_handle; fd = fs_handle_get_fd(fs_handle); if (fd < 0) { + PERROR("Failed to get fd of index file at %s", idx_file_path); goto error; } @@ -302,6 +305,7 @@ int relay_index_file_write(const struct relay_index_file *index_file, fd = fs_handle_get_fd(index_file->handle); if (fd < 0) { + PERROR("Failed to get fd from handle"); ret = fd; goto end; } @@ -329,6 +333,7 @@ int relay_index_file_read(const struct relay_index_file *index_file, fd = fs_handle_get_fd(index_file->handle); if (fd < 0) { + PERROR("Failed to get fd of handle %p", index_file->handle); ret = fd; goto end; } @@ -352,6 +357,7 @@ int relay_index_file_seek_end(struct relay_index_file *index_file) fd = fs_handle_get_fd(index_file->handle); if (fd < 0) { + PERROR("Failed to get fd of handle %p", index_file->handle); ret = fd; goto end; }