WIP FPC-III support
[linux/fpc-iii.git] / tools / perf / util / usage.c
blob196438ee4c9d08eecb108fcb3aaaab42cd4f7bcb
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 <stdio.h>
12 #include <stdlib.h>
13 #include <linux/compiler.h>
15 static __noreturn void usage_builtin(const char *err)
17 fprintf(stderr, "\n Usage: %s\n", err);
18 exit(129);
21 /* If we are in a dlopen()ed .so write to a global variable would segfault
22 * (ugh), so keep things static. */
23 static void (*usage_routine)(const char *err) __noreturn = usage_builtin;
25 void usage(const char *err)
27 usage_routine(err);