diff mbox series

trace-cmd record: Keep --proxy from being passed to agents

Message ID 20220729164940.233652b0@rorschach.local.home (mailing list archive)
State Accepted
Commit 9a1c5d7943b812c87212744a2fb50f344dbddc40
Headers show
Series trace-cmd record: Keep --proxy from being passed to agents | expand

Commit Message

Steven Rostedt July 29, 2022, 8:49 p.m. UTC
From: "Steven Rostedt (Google)" <rostedt@goodmis.org>

If an agent (-A) is specified before a --proxy option, then the proxy
option will be passed to the agent, which should not be done. Keep that
from happening.

Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 tracecmd/trace-record.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/tracecmd/trace-record.c b/tracecmd/trace-record.c
index 2406489a..63be4069 100644
--- a/tracecmd/trace-record.c
+++ b/tracecmd/trace-record.c
@@ -6180,7 +6180,7 @@  static void parse_record_options(int argc,
 		 * all the arguments for this instance.
 		 */
 		if (c != 'B' && (c != 'A' || is_proxy) && c != OPT_name &&
-		    is_guest(ctx->instance)) {
+		    is_guest(ctx->instance) && c != OPT_proxy) {
 			add_arg(ctx->instance, c, opts, long_options, optarg);
 			if (c == 'C')
 				ctx->instance->flags |= BUFFER_FL_HAS_CLOCK;