+
+static int do_trace_cmd(const char *trace, pid_t pid, int command)
+{
+ struct ustcomm_header req_header, res_header;
+ struct ustcomm_trace_info trace_inf;
+ int result;
+
+ result = ustcomm_pack_trace_info(&req_header,
+ &trace_inf,
+ trace);
+ if (result < 0) {
+ errno = -result;
+ return -1;
+ }
+
+ req_header.command = command;
+
+ return do_cmd(pid, &req_header, (char *)&trace_inf, &res_header, NULL);
+}
+