Re: [PATCH tracing/kprobes v4] perf: Add perf probe subcommand forkprobe-event setup helper

From: Frederic Weisbecker
Date: Mon Oct 12 2009 - 14:04:55 EST


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 :)

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/