X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Ftrace-chunk.h;h=ce668bc8be2e6cc11ba4dac4f197888eba98b660;hp=52fce996020ed5926b26d8f43c01fb5a4c8040be;hb=a321667af6f25a77e32787fe89ad306786f7b29a;hpb=b2621f79ae2fade4d2d7f21624dfe4649e5e3352 diff --git a/src/common/trace-chunk.h b/src/common/trace-chunk.h index 52fce9960..ce668bc8b 100644 --- a/src/common/trace-chunk.h +++ b/src/common/trace-chunk.h @@ -1,29 +1,20 @@ /* - * Copyright (C) 2019 - Jérémie Galarneau + * Copyright (C) 2019 Jérémie Galarneau * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License, version 2.1 only, - * as published by the Free Software Foundation. + * SPDX-License-Identifier: LGPL-2.1-only * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License - * for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef LTTNG_TRACE_CHUNK_H #define LTTNG_TRACE_CHUNK_H -#include -#include #include +#include +#include +#include +#include #include #include -#include /* * A trace chunk is a group of directories and files forming a (or a set of) @@ -175,8 +166,21 @@ enum lttng_trace_chunk_status lttng_trace_chunk_create_subdirectory( LTTNG_HIDDEN enum lttng_trace_chunk_status lttng_trace_chunk_open_file( - struct lttng_trace_chunk *chunk, const char *filename, - int flags, mode_t mode, int *out_fd, bool expect_no_file); + struct lttng_trace_chunk *chunk, + const char *filename, + int flags, + mode_t mode, + int *out_fd, + bool expect_no_file); + +LTTNG_HIDDEN +enum lttng_trace_chunk_status lttng_trace_chunk_open_fs_handle( + struct lttng_trace_chunk *chunk, + const char *filename, + int flags, + mode_t mode, + struct fs_handle **out_handle, + bool expect_no_file); LTTNG_HIDDEN int lttng_trace_chunk_unlink_file(struct lttng_trace_chunk *chunk, @@ -196,6 +200,10 @@ LTTNG_HIDDEN const char *lttng_trace_chunk_command_type_get_name( enum lttng_trace_chunk_command_type command); +LTTNG_HIDDEN +bool lttng_trace_chunk_ids_equal(const struct lttng_trace_chunk *chunk_a, + const struct lttng_trace_chunk *chunk_b); + /* Returns true on success. */ LTTNG_HIDDEN bool lttng_trace_chunk_get(struct lttng_trace_chunk *chunk);