From patchwork Sat Jan 19 09:15:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 10771961 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B124E1580 for ; Sat, 19 Jan 2019 09:15:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9AC662E091 for ; Sat, 19 Jan 2019 09:15:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8F0182ED0E; Sat, 19 Jan 2019 09:15:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 39D592E091 for ; Sat, 19 Jan 2019 09:15:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727646AbfASJPz (ORCPT ); Sat, 19 Jan 2019 04:15:55 -0500 Received: from s3.sipsolutions.net ([144.76.43.62]:48456 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727644AbfASJPy (ORCPT ); Sat, 19 Jan 2019 04:15:54 -0500 Received: by sipsolutions.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92-RC4) (envelope-from ) id 1gkmjI-0000ru-GQ; Sat, 19 Jan 2019 10:15:52 +0100 From: Johannes Berg To: linux-trace-devel@vger.kernel.org Cc: Steven Rostedt , Johannes Berg Subject: [PATCH] trace-cmd: make python work again Date: Sat, 19 Jan 2019 10:15:46 +0100 Message-Id: <20190119091546.20584-1-johannes@sipsolutions.net> X-Mailer: git-send-email 2.17.2 Sender: linux-trace-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Johannes Berg Code reshuffling/renaming wasn't complete in ctracecmd.i: * it needs to %include "trace-seq.h" so that we can access those functions from python * it needs to use tep_* instead of pevent_* everywhere, even function calls done as parameters to functions, I guess some sort of automatic conversion missed those Signed-off-by: Johannes Berg --- python/ctracecmd.i | 1 + python/tracecmd.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/python/ctracecmd.i b/python/ctracecmd.i index b18cba9b3b5f..55fd8755c237 100644 --- a/python/ctracecmd.i +++ b/python/ctracecmd.i @@ -239,4 +239,5 @@ static int python_callback(struct trace_seq *s, #define __thread %include "trace-cmd.h" +%include "trace-seq.h" %include "event-parse.h" diff --git a/python/tracecmd.py b/python/tracecmd.py index f551a1489e25..a3816dfdb788 100644 --- a/python/tracecmd.py +++ b/python/tracecmd.py @@ -106,7 +106,7 @@ class Event(object, DictMixin): f = tep_find_any_field(self._format, name) if f is None: return None - ret, val = tep_read_number_field(f, pevent_record_data_get(self._record)) + ret, val = tep_read_number_field(f, tep_record_data_get(self._record)) if ret: return None return val @@ -142,7 +142,7 @@ class Field(object): def __long__(self): ret, val = tep_read_number_field(self._field, - pevent_record_data_get(self._record)) + tep_record_data_get(self._record)) if ret: raise FieldError("Not a number field") return val