Linux 5.1.15
[linux/fpc-iii.git] / tools / perf / util / usage.c
blob070d25ceea6a92ad2092f6710d5d50a29a279e64
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3 * usage.c
5 * Various reporting routines.
6 * Originally copied from GIT source.
8 * Copyright (C) Linus Torvalds, 2005
9 */
10 #include "util.h"
11 #include "debug.h"
13 static __noreturn void usage_builtin(const char *err)
15 fprintf(stderr, "\n Usage: %s\n", err);
16 exit(129);
19 /* If we are in a dlopen()ed .so write to a global variable would segfault
20 * (ugh), so keep things static. */
21 static void (*usage_routine)(const char *err) __noreturn = usage_builtin;
23 void usage(const char *err)
25 usage_routine(err);