return;
}
- DBG("Relay deleting session %lu", cmd->session->id);
+ DBG("Relay deleting session %" PRIu64, cmd->session->id);
free(cmd->session->sock);
rcu_read_lock();
&iter);
node = lttng_ht_iter_get_node_ulong(&iter);
if (node == NULL) {
- DBG("Relay stream %lu not found", be64toh(stream_info.stream_id));
+ DBG("Relay stream %" PRIu64 " not found", be64toh(stream_info.stream_id));
ret = -1;
goto end_unlock;
}
&iter);
node = lttng_ht_iter_get_node_ulong(&iter);
if (node == NULL) {
- DBG("Relay stream %lu not found", stream_id);
+ DBG("Relay stream %" PRIu64 " not found", stream_id);
ret = NULL;
goto end;
}
data_buffer_size = data_size;
}
memset(data_buffer, 0, data_size);
- DBG2("Relay receiving metadata, waiting for %lu bytes", data_size);
+ DBG2("Relay receiving metadata, waiting for %" PRIu64 " bytes", data_size);
ret = cmd->sock->ops->recvmsg(cmd->sock, data_buffer, data_size,
MSG_WAITALL);
if (ret < 0 || ret != data_size) {
goto end;
}
session->id = ++last_relay_session_id;
- DBG("Created session %lu", session->id);
+ DBG("Created session %" PRIu64, session->id);
cmd->session = session;
}
session->version_check_done = 1;
net_seq_num = be64toh(data_hdr.net_seq_num);
- DBG3("Receiving data of size %u for stream id %zu seqnum %" PRIu64,
+ DBG3("Receiving data of size %u for stream id %" PRIu64 " seqnum %" PRIu64,
data_size, stream_id, net_seq_num);
ret = cmd->sock->ops->recvmsg(cmd->sock, data_buffer, data_size, MSG_WAITALL);
if (ret <= 0) {
ret = -1;
goto end_unlock;
}
- DBG2("Relay wrote %d bytes to tracefile for stream id %lu", ret, stream->stream_handle);
+ DBG2("Relay wrote %d bytes to tracefile for stream id %" PRIu64,
+ ret, stream->stream_handle);
stream->prev_seq = net_seq_num;
DBG("Control connection closed with %d", pollfd);
} else {
if (relay_connection->session) {
- DBG2("Relay worker receiving data for session : %lu",
+ DBG2("Relay worker receiving data for session : %" PRIu64,
relay_connection->session->id);
}
ret = relay_process_control(&recv_hdr,
}
end:
- DBG("Health state current %" PRIu64 ", last %" PRIu64 ", ret %d",
+ DBG("Health state current %lu, last %lu, ret %d",
current, last, ret);
return retval;
#include <stdio.h>
#include <string.h>
#include <unistd.h>
+#include <inttypes.h>
#include <common/common.h>
#include <common/kernel-ctl/kernel-ctl.h>
goto error;
}
- DBG3("Kernel create channel %s in %s with attr: %d, %zu, %zu, %u, %u, %d",
+ DBG3("Kernel create channel %s in %s with attr: %d, %" PRIu64 ", %" PRIu64 ", %u, %u, %d",
chan->name, path, lkc->channel->attr.overwrite,
lkc->channel->attr.subbuf_size, lkc->channel->attr.num_subbuf,
lkc->channel->attr.switch_timer_interval, lkc->channel->attr.read_timer_interval,
}
/* Receive variable len data */
- DBG("Receiving %lu URI(s) from client ...", nb_uri);
+ DBG("Receiving %zu URI(s) from client ...", nb_uri);
ret = lttcomm_recv_unix_sock(sock, uris, len);
if (ret <= 0) {
DBG("No URIs received from client... continuing");
}
/* Receive variable len data */
- DBG("Waiting for %lu URIs from client ...", nb_uri);
+ DBG("Waiting for %zu URIs from client ...", nb_uri);
ret = lttcomm_recv_unix_sock(sock, uris, len);
if (ret <= 0) {
DBG("No URIs received from client... continuing");
#include <sys/socket.h>
#include <sys/types.h>
#include <unistd.h>
+#include <inttypes.h>
#include <common/common.h>
#include <common/kernel-ctl/kernel-ctl.h>
PERROR("write metadata stream id");
goto end;
}
- DBG("Metadata stream id %zu written before data",
+ DBG("Metadata stream id %" PRIu64 " written before data",
stream->relayd_stream_id);
end:
}
goto end;
} else if (ret > len) {
- PERROR("Error in file write (ret %ld > len %lu)", ret, len);
+ PERROR("Error in file write (ret %zd > len %lu)", ret, len);
written += ret;
goto end;
} else {
len -= ret;
mmap_offset += ret;
}
- DBG("Consumer mmap write() ret %ld (len %lu)", ret, len);
+ DBG("Consumer mmap write() ret %zd (len %lu)", ret, len);
/* This call is useless on a socket so better save a syscall. */
if (!relayd) {
#include <sys/mman.h>
#include <sys/socket.h>
#include <sys/types.h>
+#include <inttypes.h>
#include <unistd.h>
#include <sys/stat.h>
{
struct consumer_relayd_sock_pair *relayd;
- DBG("Kernel consumer destroying relayd %zu",
+ DBG("Kernel consumer destroying relayd %" PRIu64,
msg.u.destroy_relayd.net_seq_idx);
/* Get relayd reference if exists. */
relayd = consumer_find_relayd(msg.u.destroy_relayd.net_seq_idx);
if (relayd == NULL) {
- ERR("Unable to find relayd %zu", msg.u.destroy_relayd.net_seq_idx);
+ ERR("Unable to find relayd %" PRIu64,
+ msg.u.destroy_relayd.net_seq_idx);
goto end_nosignal;
}
* display the error but continue processing to try
* to release the subbuffer
*/
- ERR("Error splicing to tracefile (ret: %ld != len: %ld)",
+ ERR("Error splicing to tracefile (ret: %zd != len: %lu)",
ret, len);
}
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
+#include <inttypes.h>
#include <common/common.h>
#include <common/defaults.h>
*stream_id = reply.handle;
}
- DBG("Relayd stream added successfully with handle %zu", reply.handle);
+ DBG("Relayd stream added successfully with handle %" PRIu64,
+ reply.handle);
error:
return ret;
/* Code flow error. Safety net. */
assert(sock);
- DBG("Relayd sending metadata of size %lu", len);
+ DBG("Relayd sending metadata of size %zu", len);
/* Send command */
ret = send_command(sock, RELAYD_SEND_METADATA, NULL, len, 0);
/* Code flow error. Safety net. */
assert(sock);
- DBG("Relayd closing stream id %zu", stream_id);
+ DBG("Relayd closing stream id %" PRIu64, stream_id);
msg.stream_id = htobe64(stream_id);
msg.last_net_seq_num = htobe64(last_net_seq_num);
ret = 0;
}
- DBG("Relayd close stream id %zu successfully", stream_id);
+ DBG("Relayd close stream id %" PRIu64 " successfully", stream_id);
error:
return ret;
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/types.h>
+#include <inttypes.h>
#include <unistd.h>
#include <common/common.h>
consumer_add_stream(new_stream);
}
- DBG("UST consumer_add_stream %s (%d,%d) with relayd id %lu",
+ DBG("UST consumer_add_stream %s (%d,%d) with relayd id %" PRIu64,
msg.u.stream.path_name, fds[0], fds[1],
new_stream->relayd_stream_id);
break;
{
struct consumer_relayd_sock_pair *relayd;
- DBG("UST consumer destroying relayd %zu",
+ DBG("UST consumer destroying relayd %" PRIu64,
msg.u.destroy_relayd.net_seq_idx);
/* Get relayd reference if exists. */
relayd = consumer_find_relayd(msg.u.destroy_relayd.net_seq_idx);
if (relayd == NULL) {
- ERR("Unable to find relayd %zu", msg.u.destroy_relayd.net_seq_idx);
+ ERR("Unable to find relayd %" PRIu64, msg.u.destroy_relayd.net_seq_idx);
goto end_nosignal;
}