Revision f871d689

b/monitor.c
549 549
{
550 550
    const char *tp_name = qdict_get_str(qdict, "name");
551 551
    bool new_state = qdict_get_bool(qdict, "option");
552
    st_change_trace_event_state(tp_name, new_state);
552
    int ret = st_change_trace_event_state(tp_name, new_state);
553

  
554
    if (!ret) {
555
        monitor_printf(mon, "unknown event name \"%s\"\n", tp_name);
556
    }
553 557
}
554 558

  
555 559
static void do_trace_file(Monitor *mon, const QDict *qdict)
b/simpletrace.c
246 246
    return NULL; /* indicates end of list reached without a match */
247 247
}
248 248

  
249
void st_change_trace_event_state(const char *tname, bool tstate)
249
bool st_change_trace_event_state(const char *tname, bool tstate)
250 250
{
251 251
    TraceEvent *tp;
252 252

  
253 253
    tp = find_trace_event_by_name(tname);
254 254
    if (tp) {
255 255
        tp->state = tstate;
256
        return true;
256 257
    }
258
    return false;
257 259
}
b/simpletrace.h
31 31
void trace6(TraceEventID event, uint64_t x1, uint64_t x2, uint64_t x3, uint64_t x4, uint64_t x5, uint64_t x6);
32 32
void st_print_trace(FILE *stream, int (*stream_printf)(FILE *stream, const char *fmt, ...));
33 33
void st_print_trace_events(FILE *stream, int (*stream_printf)(FILE *stream, const char *fmt, ...));
34
void st_change_trace_event_state(const char *tname, bool tstate);
34
bool st_change_trace_event_state(const char *tname, bool tstate);
35 35
void st_print_trace_file_status(FILE *stream, int (*stream_printf)(FILE *stream, const char *fmt, ...));
36 36
void st_set_trace_file_enabled(bool enable);
37 37
bool st_set_trace_file(const char *file);

Also available in: Unified diff