diff options
author | Namhyung Kim <namhyung@kernel.org> | 2014-01-14 20:45:27 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-01-15 13:10:36 -0500 |
commit | e825e756f84eab0e68d7d6644c018c3412748406 (patch) | |
tree | d128b991d235fc7b09cf046929ce4438b104b5b3 /tools/lib | |
parent | 504586e0954bcf9550dfdea37d3234174ed1d68f (diff) |
tools lib traceevent: Get rid of die() finally!!
Now all of its users were gone. :)
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Reviewed-by: Jiri Olsa <jolsa@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/1389750340-15965-5-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/lib')
-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 | } | ||