From: "Yordan Karadzhov (VMware)" <y.karadz@gmail.com>
To: linux-trace-devel@vger.kernel.org
Cc: "Yordan Karadzhov (VMware)" <y.karadz@gmail.com>
Subject: [PATCH 4/5] trace-cruncher: Proper labeling of the libtracefs errors
Date: Fri, 1 Oct 2021 16:33:45 +0300 [thread overview]
Message-ID: <20211001133346.8217-5-y.karadz@gmail.com> (raw)
In-Reply-To: <20211001133346.8217-1-y.karadz@gmail.com>
'TEP_ERROR' is supposed to be used with errors coming from libtraceevent,
not from libtracefs.
Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
---
src/ftracepy-utils.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/ftracepy-utils.c b/src/ftracepy-utils.c
index b0f5e0e..1a8a136 100644
--- a/src/ftracepy-utils.c
+++ b/src/ftracepy-utils.c
@@ -68,14 +68,14 @@ static void TfsError_fmt(struct tracefs_instance *instance,
vasprintf(&tc_err_log, fmt, args);
va_end(args);
- PyErr_Format(TEP_ERROR, "%s\ntfs_error: %s",
+ PyErr_Format(TFS_ERROR, "%s\ntfs_error: %s",
tc_err_log, tfs_err_log);
tfs_clear_error_log(instance);
free(tfs_err_log);
free(tc_err_log);
} else {
- PyErr_FormatV(TEP_ERROR, fmt, args);
+ PyErr_FormatV(TFS_ERROR, fmt, args);
va_end(args);
}
}
@@ -86,11 +86,11 @@ static void TfsError_setstr(struct tracefs_instance *instance,
char *tfs_err_log = tfs_error_log(instance, NULL);
if (tfs_err_log) {
- PyErr_Format(TEP_ERROR, "%s\ntfs_error: %s", msg, tfs_err_log);
+ PyErr_Format(TFS_ERROR, "%s\ntfs_error: %s", msg, tfs_err_log);
tfs_clear_error_log(instance);
free(tfs_err_log);
} else {
- PyErr_SetString(TEP_ERROR, msg);
+ PyErr_SetString(TFS_ERROR, msg);
}
}
--
2.30.2
next prev parent reply other threads:[~2021-10-01 13:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-01 13:33 [PATCH 0/5] trace-cruncher: Improve error messages Yordan Karadzhov (VMware)
2021-10-01 13:33 ` [PATCH 1/5] trace-cruncher: Error on fail to destroy Yordan Karadzhov (VMware)
2021-10-01 13:33 ` [PATCH 2/5] trace-cruncher: Proper type name for the python objects Yordan Karadzhov (VMware)
2021-10-01 13:33 ` [PATCH 3/5] trace-cruncher: Correct misleading error message Yordan Karadzhov (VMware)
2021-10-01 13:33 ` Yordan Karadzhov (VMware) [this message]
2021-10-01 13:33 ` [PATCH 5/5] trace-cruncher: Proper labeling of non libtracefs errors Yordan Karadzhov (VMware)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211001133346.8217-5-y.karadz@gmail.com \
--to=y.karadz@gmail.com \
--cc=linux-trace-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).