diff options
| -rw-r--r-- | tools/lib/traceevent/event-utils.h | 4 | ||||
| -rw-r--r-- | tools/lib/traceevent/parse-utils.c | 44 |
2 files changed, 0 insertions, 48 deletions
diff --git a/tools/lib/traceevent/event-utils.h b/tools/lib/traceevent/event-utils.h index e76c9acb92cd..d1dc2170e402 100644 --- a/tools/lib/traceevent/event-utils.h +++ b/tools/lib/traceevent/event-utils.h | |||
| @@ -23,18 +23,14 @@ | |||
| 23 | #include <ctype.h> | 23 | #include <ctype.h> |
| 24 | 24 | ||
| 25 | /* Can be overridden */ | 25 | /* Can be overridden */ |
| 26 | void die(const char *fmt, ...); | ||
| 27 | void *malloc_or_die(unsigned int size); | ||
| 28 | void warning(const char *fmt, ...); | 26 | void warning(const char *fmt, ...); |
| 29 | void pr_stat(const char *fmt, ...); | 27 | void pr_stat(const char *fmt, ...); |
| 30 | void vpr_stat(const char *fmt, va_list ap); | 28 | void vpr_stat(const char *fmt, va_list ap); |
| 31 | 29 | ||
| 32 | /* Always available */ | 30 | /* Always available */ |
| 33 | void __die(const char *fmt, ...); | ||
| 34 | void __warning(const char *fmt, ...); | 31 | void __warning(const char *fmt, ...); |
| 35 | void __pr_stat(const char *fmt, ...); | 32 | void __pr_stat(const char *fmt, ...); |
| 36 | 33 | ||
| 37 | void __vdie(const char *fmt, ...); | ||
| 38 | void __vwarning(const char *fmt, ...); | 34 | void __vwarning(const char *fmt, ...); |
| 39 | void __vpr_stat(const char *fmt, ...); | 35 | void __vpr_stat(const char *fmt, ...); |
| 40 | 36 | ||
diff --git a/tools/lib/traceevent/parse-utils.c b/tools/lib/traceevent/parse-utils.c index bba701cf10e6..eda07fa31dca 100644 --- a/tools/lib/traceevent/parse-utils.c +++ b/tools/lib/traceevent/parse-utils.c | |||
| @@ -25,40 +25,6 @@ | |||
| 25 | 25 | ||
| 26 | #define __weak __attribute__((weak)) | 26 | #define __weak __attribute__((weak)) |
| 27 | 27 | ||
| 28 | void __vdie(const char *fmt, va_list ap) | ||
| 29 | { | ||
| 30 | int ret = errno; | ||
| 31 | |||
| 32 | if (errno) | ||
| 33 | perror("trace-cmd"); | ||
| 34 | else | ||
| 35 | ret = -1; | ||
| 36 | |||
| 37 | fprintf(stderr, " "); | ||
| 38 | vfprintf(stderr, fmt, ap); | ||
| 39 | |||
| 40 | fprintf(stderr, "\n"); | ||
| 41 | exit(ret); | ||
| 42 | } | ||
| 43 | |||
| 44 | void __die(const char *fmt, ...) | ||
| 45 | { | ||
| 46 | va_list ap; | ||
| 47 | |||
| 48 | va_start(ap, fmt); | ||
| 49 | __vdie(fmt, ap); | ||
| 50 | va_end(ap); | ||
| 51 | } | ||
| 52 | |||
| 53 | void __weak die(const char *fmt, ...) | ||
| 54 | { | ||
| 55 | va_list ap; | ||
| 56 | |||
| 57 | va_start(ap, fmt); | ||
| 58 | __vdie(fmt, ap); | ||
| 59 | va_end(ap); | ||
| 60 | } | ||
| 61 | |||
| 62 | void __vwarning(const char *fmt, va_list ap) | 28 | void __vwarning(const char *fmt, va_list ap) |
| 63 | { | 29 | { |
| 64 | if (errno) | 30 | if (errno) |
| @@ -117,13 +83,3 @@ void __weak pr_stat(const char *fmt, ...) | |||
| 117 | __vpr_stat(fmt, ap); | 83 | __vpr_stat(fmt, ap); |
| 118 | va_end(ap); | 84 | va_end(ap); |
| 119 | } | 85 | } |
| 120 | |||
| 121 | void __weak *malloc_or_die(unsigned int size) | ||
| 122 | { | ||
| 123 | void *data; | ||
| 124 | |||
| 125 | data = malloc(size); | ||
| 126 | if (!data) | ||
| 127 | die("malloc"); | ||
| 128 | return data; | ||
| 129 | } | ||
