diff options
Diffstat (limited to 'tools/lib/traceevent/parse-utils.c')
-rw-r--r-- | tools/lib/traceevent/parse-utils.c | 44 |
1 files changed, 0 insertions, 44 deletions
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 | } | ||