Messages in this thread | | | Date | Mon, 12 Oct 2009 20:03:01 +0200 | From | Frederic Weisbecker <> | Subject | Re: [PATCH tracing/kprobes v4] perf: Add perf probe subcommand for kprobe-event setup helper |
| |
On Thu, Oct 08, 2009 at 05:17:38PM -0400, Masami Hiramatsu wrote: > +static void semantic_error(const char *msg) > +{ > + fprintf(stderr, "Semantic error: %s\n", msg); > + exit(1); > +} > + > +static void perror_exit(const char *msg) > +{ > + perror(msg); > + exit(1); > +}
We have that already btw:
tools/perf/util/util.h: extern void die(const char *err, ...) NORETURN __attribute__((format (printf, 1, 2)));
> +static void msg_exit(int ret, const char *fmt, ...) > +{ > + va_list ap; > + > + va_start(ap, fmt); > + fprintf(stderr, "Error: "); > + vfprintf(stderr, fmt, ap); > + va_end(ap); > + > + fprintf(stderr, "\n"); > + exit(ret); > +}
And somehow ditto :)
| |