markers: export pointer array instead of struct marker
[ust.git] / libust / tracectl.c
index b73fa7cdf88f05fa106dc8ba01b5b6f9cfa9ce19..233a460d6163bdaa3ff7d61d100b646a91c763c1 100644 (file)
@@ -100,11 +100,11 @@ static void print_markers(FILE *fp)
 
        while (iter.marker) {
                fprintf(fp, "marker: %s/%s %d \"%s\" %p\n",
-                       iter.marker->channel,
-                       iter.marker->name,
-                       (int)imv_read(iter.marker->state),
-                       iter.marker->format,
-                       iter.marker->location);
+                       (*iter.marker)->channel,
+                       (*iter.marker)->name,
+                       (int)imv_read((*iter.marker)->state),
+                       (*iter.marker)->format,
+                       (*iter.marker)->location);
                marker_iter_next(&iter);
        }
        unlock_markers();
@@ -355,7 +355,7 @@ static int set_subbuf_size(const char *trace_name, const char *ch_name,
        }
 
        channel->subbuf_size = power;
-       DBG("the set_subbuf_size for the requested channel is %u", channel->subbuf_size);
+       DBG("the set_subbuf_size for the requested channel is %zu", channel->subbuf_size);
 
 unlock_traces:
        ltt_unlock_traces();
@@ -393,7 +393,7 @@ static int set_subbuf_num(const char *trace_name, const char *ch_name,
        }
 
        channel->subbuf_cnt = num;
-       DBG("the set_subbuf_cnt for the requested channel is %zd", channel->subbuf_cnt);
+       DBG("the set_subbuf_cnt for the requested channel is %u", channel->subbuf_cnt);
 
 unlock_traces:
        ltt_unlock_traces();
@@ -828,7 +828,7 @@ static void process_marker_cmd(int sock, int command,
 {
        struct ustcomm_header _reply_header;
        struct ustcomm_header *reply_header = &_reply_header;
-       int result;
+       int result = 0;
 
        memset(reply_header, 0, sizeof(*reply_header));
 
@@ -1232,6 +1232,7 @@ free_name:
 
 static void __attribute__((constructor)) init()
 {
+       struct timespec ts;
        int result;
        char* autoprobe_val = NULL;
        char* subbuffer_size_val = NULL;
@@ -1266,7 +1267,7 @@ static void __attribute__((constructor)) init()
        create_listener();
 
        /* Get clock the clock source type */
-       struct timespec ts;
+
        /* Default clock source */
        ust_clock_source = CLOCK_TRACE;
        if (clock_gettime(ust_clock_source, &ts) != 0) {
@@ -1313,8 +1314,8 @@ static void __attribute__((constructor)) init()
 
                DBG("now iterating on markers already registered");
                while (iter.marker) {
-                       DBG("now iterating on marker %s", iter.marker->name);
-                       auto_probe_connect(iter.marker);
+                       DBG("now iterating on marker %s", (*iter.marker)->name);
+                       auto_probe_connect(*iter.marker);
                        marker_iter_next(&iter);
                }
        }
This page took 0.024289 seconds and 4 git commands to generate.