remove unused variables
[ust.git] / libust / tracectl.c
index 1b684445e63f1a2efa38bd59f0678f018adb6a9a..ac551d50e802afec1bcd3a1abdcba6cddbf1c326 100644 (file)
@@ -469,7 +469,6 @@ static int do_cmd_get_subbuf_size(const char *recvbuf, struct ustcomm_source *sr
 static unsigned int pow2_higher_or_eq(unsigned int v)
 {
        int hb = fls(v);
-       int hbm1 = hb-1;
        int retval = 1<<(hb-1);
 
        if(v-retval == 0)
@@ -788,6 +787,15 @@ static void listener_cleanup(void *ptr)
        ustcomm_fini_app(&ustcomm_app, 0);
 }
 
+static void do_cmd_force_switch()
+{
+       struct blocked_consumer *bc;
+
+       list_for_each_entry(bc, &blocked_consumers, list) {
+               ltt_force_switch(bc->buf, FORCE_FLUSH);
+       }
+}
+
 int process_client_cmd(char *recvbuf, struct ustcomm_source *src)
 {
        int result;
@@ -1013,6 +1021,9 @@ int process_client_cmd(char *recvbuf, struct ustcomm_source *src)
                if(result)
                        ERR("cannot set UST_DAEMON_SOCKET environment variable");
        }
+       else if(nth_token_is(recvbuf, "force_switch", 0) == 1) {
+               do_cmd_force_switch();
+       }
        else {
                ERR("unable to parse message: %s", recvbuf);
        }
This page took 0.02272 seconds and 4 git commands to generate.