aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-11-25 11:57:17 -0500
committerJohannes Berg <johannes@sipsolutions.net>2009-11-25 11:57:17 -0500
commita2ae0f35f900008b7862a34eb9e1afec2c0cb592 (patch)
treef009f31e2d4a19cd44eda6ffc46ac34fea832071
parentf60806ddf7605e2eb0108d6629c131de82721719 (diff)
remove unused code
write_trace(), find_trace_type() and consequently old_ftrace_name are unused, so remove for now. Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
-rw-r--r--trace-cmd.c41
1 files changed, 0 insertions, 41 deletions
diff --git a/trace-cmd.c b/trace-cmd.c
index 4234832..7d41744 100644
--- a/trace-cmd.c
+++ b/trace-cmd.c
@@ -56,8 +56,6 @@ static int output_fd;
56 56
57static int latency; 57static int latency;
58 58
59static int old_ftrace_name;
60
61static int cpu_count; 59static int cpu_count;
62static int *pids; 60static int *pids;
63 61
@@ -250,45 +248,6 @@ static void put_tracing_file(char *file)
250 free(file); 248 free(file);
251} 249}
252 250
253static void write_trace(const char *file, const char *val)
254{
255 char *path;
256 int fd;
257
258 path = get_tracing_file(file);
259 fd = open(path, O_WRONLY);
260 if (fd < 0)
261 die("writing %s", path);
262 put_tracing_file(path);
263 write(fd, val, strlen(val));
264 close(fd);
265
266}
267
268static int find_trace_type(const char *type)
269{
270 char scan[100];
271 char *path;
272 FILE *fp;
273 int ret;
274
275 path = get_tracing_file(type);
276 fp = fopen(path, "r");
277 if (!fp)
278 die("reading %s", path);
279 put_tracing_file(path);
280 do {
281 ret = fscanf(fp, "%99s", scan);
282 if (ret > 0 && strcmp(scan, "ftrace"))
283 old_ftrace_name = 1;
284 if (ret > 0 && strcmp(scan, type) == 0)
285 break;
286 } while (ret > 0);
287 fclose(fp);
288
289 return ret > 0;
290}
291
292static int set_ftrace(int set) 251static int set_ftrace(int set)
293{ 252{
294 struct stat buf; 253 struct stat buf;