2 * Copyright (C) 2011 EfficiOS Inc.
3 * Copyright (C) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
5 * SPDX-License-Identifier: GPL-2.0-only
10 #include "lttng-sessiond.hpp"
11 #include "snapshot.hpp"
14 #include <common/error.hpp>
20 * Write to writable pipe used to notify a thread.
22 int notify_thread_pipe(int wpipe
)
26 /* Ignore if the pipe is invalid. */
31 ret
= lttng_write(wpipe
, "!", 1);
34 PERROR("Failed to write to thread pipe");
40 int loglevels_match(int a_loglevel_type
,
44 int loglevel_all_type
)
48 if (a_loglevel_type
== b_loglevel_type
) {
49 /* Same loglevel type. */
50 if (b_loglevel_type
!= loglevel_all_type
) {
52 * Loglevel value must also match since the loglevel
55 if (a_loglevel_value
!= b_loglevel_value
) {
60 /* Loglevel type is different: no match. */
67 const char *session_get_base_path(const struct ltt_session
*session
)
69 return consumer_output_get_base_path(session
->consumer
);
72 const char *consumer_output_get_base_path(const struct consumer_output
*output
)
74 return output
->type
== CONSUMER_DST_LOCAL
? output
->dst
.session_root_path
:
75 output
->dst
.net
.base_dir
;
This page took 0.03051 seconds and 4 git commands to generate.