From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01EFBC433E6 for ; Mon, 1 Mar 2021 14:40:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CE75664DBA for ; Mon, 1 Mar 2021 14:40:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236452AbhCAOkW (ORCPT ); Mon, 1 Mar 2021 09:40:22 -0500 Received: from mail.kernel.org ([198.145.29.99]:60634 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234389AbhCAOkU (ORCPT ); Mon, 1 Mar 2021 09:40:20 -0500 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B560364E22; Mon, 1 Mar 2021 14:38:58 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.94) (envelope-from ) id 1lGjhJ-001PuG-Ld; Mon, 01 Mar 2021 09:38:57 -0500 Message-ID: <20210301143857.541050724@goodmis.org> User-Agent: quilt/0.66 Date: Mon, 01 Mar 2021 09:37:30 -0500 From: Steven Rostedt To: linux-trace-devel@vger.kernel.org Cc: "Tzvetomir Stoyanov (VMware)" Subject: [PATCH 6/8] trace-cmd output: Set file_state of output handle after copy of headers References: <20210301143724.540985351@goodmis.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org From: "Steven Rostedt (VMware)" Now that the input and output handles know the state they are at in reading or writing, the tracecmd_copy() has to set the state of the output handle it creates. Signed-off-by: Steven Rostedt (VMware) --- lib/trace-cmd/trace-output.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/trace-cmd/trace-output.c b/lib/trace-cmd/trace-output.c index 6d504cbaf133..1156899a85d3 100644 --- a/lib/trace-cmd/trace-output.c +++ b/lib/trace-cmd/trace-output.c @@ -1656,6 +1656,8 @@ struct tracecmd_output *tracecmd_copy(struct tracecmd_input *ihandle, if (tracecmd_copy_headers(ihandle, handle->fd) < 0) goto out_free; + handle->file_state = TRACECMD_FILE_CMD_LINES; + /* The file is all ready to have cpu data attached */ return handle; -- 2.30.0