]> git.karo-electronics.de Git - karo-tx-linux.git/blob - tools/perf/util/usage.c
Merge branch 'work.__copy_to_user' of git://git.kernel.org/pub/scm/linux/kernel/git...
[karo-tx-linux.git] / tools / perf / util / usage.c
1 /*
2  * usage.c
3  *
4  * Various reporting routines.
5  * Originally copied from GIT source.
6  *
7  * Copyright (C) Linus Torvalds, 2005
8  */
9 #include "util.h"
10 #include "debug.h"
11
12 static __noreturn void usage_builtin(const char *err)
13 {
14         fprintf(stderr, "\n Usage: %s\n", err);
15         exit(129);
16 }
17
18 /* If we are in a dlopen()ed .so write to a global variable would segfault
19  * (ugh), so keep things static. */
20 static void (*usage_routine)(const char *err) __noreturn = usage_builtin;
21
22 void usage(const char *err)
23 {
24         usage_routine(err);
25 }