X-Git-Url: https://git.liburcu.org/?p=ust.git;a=blobdiff_plain;f=libustctl%2Flibustctl.c;h=d57e6458b047a1d4c82353b331be4a8ac89fac79;hp=e9709c574e0bbe1e2b82a0b27e784288b5e8ec67;hb=e005efaa25bb1c65019e147e5290733cf5e0c82d;hpb=7ecca90ddd823c78c6c26f927426e08dc512c92a diff --git a/libustctl/libustctl.c b/libustctl/libustctl.c index e9709c5..d57e645 100644 --- a/libustctl/libustctl.c +++ b/libustctl/libustctl.c @@ -379,6 +379,12 @@ int ustctl_alloc_trace(int sock, const char *trace) return do_trace_cmd(sock, trace, ALLOC_TRACE); } + +int ustctl_force_switch(int sock, const char *trace) +{ + return do_trace_cmd(sock, trace, FORCE_SUBBUF_SWITCH); +} + /** * Stops an UST trace according to a PID. * @@ -647,13 +653,3 @@ int ustctl_get_sock_path(int sock, char **sock_path) return 0; } - -int ustctl_force_switch(int sock, const char *trace) -{ - struct ustcomm_header req_header, res_header; - - req_header.command = FORCE_SUBBUF_SWITCH; - req_header.size = 0; - - return do_cmd(sock, &req_header, NULL, &res_header, NULL); -}