Skip to contentSkip to conversation

perf tools: Remove dead quote.[ch] code

tip:perf/urgent tip-bot for Arnaldo Carvalho de Melo 1 participant 1 message Jun 7, 2018 perf events

lore
Share & tools
lore
#0 lore raw
Commit-ID:  4f5aeecd0d1233cbd0ccd60f4d6701404884471a
Gitweb:     https://git.kernel.org/tip/4f5aeecd0d1233cbd0ccd60f4d6701404884471a
Author:     Arnaldo Carvalho de Melo <[email protected]>
AuthorDate: Thu, 24 May 2018 10:49:25 -0300
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Mon, 4 Jun 2018 10:28:50 -0300

perf tools: Remove dead quote.[ch] code

In c68677014bac ("perf tools: Remove support for command aliases") we removed the only remaining use of a function provided by these files, so ditch it.

---
 tools/perf/perf.c       |  1 -
 tools/perf/util/Build   |  1 -
 tools/perf/util/quote.c | 62 -------------------------------------------------
 tools/perf/util/quote.h | 31 -------------------------
 4 files changed, 95 deletions(-)
tools/perf/perf.c +0 -1
index 51c81509a315..a11cb006f968 100644
@@ -12,7 +12,6 @@
 #include "util/env.h"
 #include <subcmd/exec-cmd.h>
 #include "util/config.h"
-#include "util/quote.h"
 #include <subcmd/run-command.h>
 #include "util/parse-events.h"
 #include <subcmd/parse-options.h>
tools/perf/util/Build +0 -1
index 5d4c45b76895..b604ef334dc9 100644
@@ -24,7 +24,6 @@ libperf-y += libstring.o
 libperf-y += bitmap.o
 libperf-y += hweight.o
 libperf-y += smt.o
-libperf-y += quote.o
 libperf-y += strbuf.o
 libperf-y += string.o
 libperf-y += strlist.o
tools/perf/util/quote.c deleted +0 -62

62 lines not on this page · raw message

tools/perf/util/quote.h deleted +0 -31
deleted file mode 100644
index 274bf26d3511..000000000000
@@ -1,31 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef __PERF_QUOTE_H
-#define __PERF_QUOTE_H
-
-#include <stddef.h>
-
-/* Help to copy the thing properly quoted for the shell safety.
- * any single quote is replaced with '\'', any exclamation point
- * is replaced with '\!', and the whole thing is enclosed in a
- * single quote pair.
- *
- * For example, if you are passing the result to system() as an
- * argument:
- *
- * sprintf(cmd, "foobar %s %s", sq_quote(arg0), sq_quote(arg1))
- *
- * would be appropriate.  If the system() is going to call ssh to
- * run the command on the other side:
- *
- * sprintf(cmd, "git-diff-tree %s %s", sq_quote(arg0), sq_quote(arg1));
- * sprintf(rcmd, "ssh %s %s", sq_util/quote.host), sq_quote(cmd));
- *
- * Note that the above examples leak memory!  Remember to free result from
- * sq_quote() in a real application.
- */
-
-struct strbuf;
-
-int sq_quote_argv(struct strbuf *, const char **argv, size_t maxlen);
-
-#endif /* __PERF_QUOTE_H */