[PATCH 4/5] trace-cruncher: Proper labeling of the libtracefs errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



'TEP_ERROR' is supposed to be used with errors coming from libtraceevent,
not from libtracefs.

Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@xxxxxxxxx>
---
 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





[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux