@@ -6035,9 +6035,9 @@ static int find_event_handle(struct tep_handle *pevent, struct event_format *eve
60356035 *
60366036 * /sys/kernel/debug/tracing/events/.../.../format
60376037 */
6038- enum pevent_errno __pevent_parse_format (struct event_format * * eventp ,
6039- struct tep_handle * pevent , const char * buf ,
6040- unsigned long size , const char * sys )
6038+ enum tep_errno __pevent_parse_format (struct event_format * * eventp ,
6039+ struct tep_handle * pevent , const char * buf ,
6040+ unsigned long size , const char * sys )
60416041{
60426042 struct event_format * event ;
60436043 int ret ;
@@ -6046,12 +6046,12 @@ enum pevent_errno __pevent_parse_format(struct event_format **eventp,
60466046
60476047 * eventp = event = alloc_event ();
60486048 if (!event )
6049- return PEVENT_ERRNO__MEM_ALLOC_FAILED ;
6049+ return TEP_ERRNO__MEM_ALLOC_FAILED ;
60506050
60516051 event -> name = event_read_name ();
60526052 if (!event -> name ) {
60536053 /* Bad event? */
6054- ret = PEVENT_ERRNO__MEM_ALLOC_FAILED ;
6054+ ret = TEP_ERRNO__MEM_ALLOC_FAILED ;
60556055 goto event_alloc_failed ;
60566056 }
60576057
@@ -6064,7 +6064,7 @@ enum pevent_errno __pevent_parse_format(struct event_format **eventp,
60646064
60656065 event -> id = event_read_id ();
60666066 if (event -> id < 0 ) {
6067- ret = PEVENT_ERRNO__READ_ID_FAILED ;
6067+ ret = TEP_ERRNO__READ_ID_FAILED ;
60686068 /*
60696069 * This isn't an allocation error actually.
60706070 * But as the ID is critical, just bail out.
@@ -6074,7 +6074,7 @@ enum pevent_errno __pevent_parse_format(struct event_format **eventp,
60746074
60756075 event -> system = strdup (sys );
60766076 if (!event -> system ) {
6077- ret = PEVENT_ERRNO__MEM_ALLOC_FAILED ;
6077+ ret = TEP_ERRNO__MEM_ALLOC_FAILED ;
60786078 goto event_alloc_failed ;
60796079 }
60806080
@@ -6083,7 +6083,7 @@ enum pevent_errno __pevent_parse_format(struct event_format **eventp,
60836083
60846084 ret = event_read_format (event );
60856085 if (ret < 0 ) {
6086- ret = PEVENT_ERRNO__READ_FORMAT_FAILED ;
6086+ ret = TEP_ERRNO__READ_FORMAT_FAILED ;
60876087 goto event_parse_failed ;
60886088 }
60896089
@@ -6098,7 +6098,7 @@ enum pevent_errno __pevent_parse_format(struct event_format **eventp,
60986098 show_warning = 1 ;
60996099
61006100 if (ret < 0 ) {
6101- ret = PEVENT_ERRNO__READ_PRINT_FAILED ;
6101+ ret = TEP_ERRNO__READ_PRINT_FAILED ;
61026102 goto event_parse_failed ;
61036103 }
61046104
@@ -6112,14 +6112,14 @@ enum pevent_errno __pevent_parse_format(struct event_format **eventp,
61126112 arg = alloc_arg ();
61136113 if (!arg ) {
61146114 event -> flags |= EVENT_FL_FAILED ;
6115- return PEVENT_ERRNO__OLD_FTRACE_ARG_FAILED ;
6115+ return TEP_ERRNO__OLD_FTRACE_ARG_FAILED ;
61166116 }
61176117 arg -> type = PRINT_FIELD ;
61186118 arg -> field .name = strdup (field -> name );
61196119 if (!arg -> field .name ) {
61206120 event -> flags |= EVENT_FL_FAILED ;
61216121 free_arg (arg );
6122- return PEVENT_ERRNO__OLD_FTRACE_ARG_FAILED ;
6122+ return TEP_ERRNO__OLD_FTRACE_ARG_FAILED ;
61236123 }
61246124 arg -> field .field = field ;
61256125 * list = arg ;
@@ -6142,7 +6142,7 @@ enum pevent_errno __pevent_parse_format(struct event_format **eventp,
61426142 return ret ;
61436143}
61446144
6145- static enum pevent_errno
6145+ static enum tep_errno
61466146__pevent_parse_event (struct tep_handle * pevent ,
61476147 struct event_format * * eventp ,
61486148 const char * buf , unsigned long size ,
@@ -6155,7 +6155,7 @@ __pevent_parse_event(struct tep_handle *pevent,
61556155 return ret ;
61566156
61576157 if (pevent && add_event (pevent , event )) {
6158- ret = PEVENT_ERRNO__MEM_ALLOC_FAILED ;
6158+ ret = TEP_ERRNO__MEM_ALLOC_FAILED ;
61596159 goto event_add_failed ;
61606160 }
61616161
@@ -6185,10 +6185,10 @@ __pevent_parse_event(struct tep_handle *pevent,
61856185 *
61866186 * /sys/kernel/debug/tracing/events/.../.../format
61876187 */
6188- enum pevent_errno tep_parse_format (struct tep_handle * pevent ,
6189- struct event_format * * eventp ,
6190- const char * buf ,
6191- unsigned long size , const char * sys )
6188+ enum tep_errno tep_parse_format (struct tep_handle * pevent ,
6189+ struct event_format * * eventp ,
6190+ const char * buf ,
6191+ unsigned long size , const char * sys )
61926192{
61936193 return __pevent_parse_event (pevent , eventp , buf , size , sys );
61946194}
@@ -6207,8 +6207,8 @@ enum pevent_errno tep_parse_format(struct tep_handle *pevent,
62076207 *
62086208 * /sys/kernel/debug/tracing/events/.../.../format
62096209 */
6210- enum pevent_errno tep_parse_event (struct tep_handle * pevent , const char * buf ,
6211- unsigned long size , const char * sys )
6210+ enum tep_errno tep_parse_event (struct tep_handle * pevent , const char * buf ,
6211+ unsigned long size , const char * sys )
62126212{
62136213 struct event_format * event = NULL ;
62146214 return __pevent_parse_event (pevent , & event , buf , size , sys );
@@ -6217,12 +6217,12 @@ enum pevent_errno tep_parse_event(struct tep_handle *pevent, const char *buf,
62176217#undef _PE
62186218#define _PE (code , str ) str
62196219static const char * const pevent_error_str [] = {
6220- PEVENT_ERRORS
6220+ TEP_ERRORS
62216221};
62226222#undef _PE
62236223
62246224int pevent_strerror (struct tep_handle * pevent __maybe_unused ,
6225- enum pevent_errno errnum , char * buf , size_t buflen )
6225+ enum tep_errno errnum , char * buf , size_t buflen )
62266226{
62276227 int idx ;
62286228 const char * msg ;
@@ -6232,11 +6232,11 @@ int pevent_strerror(struct tep_handle *pevent __maybe_unused,
62326232 return 0 ;
62336233 }
62346234
6235- if (errnum <= __PEVENT_ERRNO__START ||
6236- errnum >= __PEVENT_ERRNO__END )
6235+ if (errnum <= __TEP_ERRNO__START ||
6236+ errnum >= __TEP_ERRNO__END )
62376237 return -1 ;
62386238
6239- idx = errnum - __PEVENT_ERRNO__START - 1 ;
6239+ idx = errnum - __TEP_ERRNO__START - 1 ;
62406240 msg = pevent_error_str [idx ];
62416241 snprintf (buf , buflen , "%s" , msg );
62426242
@@ -6517,7 +6517,7 @@ int pevent_register_print_function(struct tep_handle *pevent,
65176517 func_handle = calloc (1 , sizeof (* func_handle ));
65186518 if (!func_handle ) {
65196519 do_warning ("Failed to allocate function handler" );
6520- return PEVENT_ERRNO__MEM_ALLOC_FAILED ;
6520+ return TEP_ERRNO__MEM_ALLOC_FAILED ;
65216521 }
65226522
65236523 func_handle -> ret_type = ret_type ;
@@ -6526,7 +6526,7 @@ int pevent_register_print_function(struct tep_handle *pevent,
65266526 if (!func_handle -> name ) {
65276527 do_warning ("Failed to allocate function name" );
65286528 free (func_handle );
6529- return PEVENT_ERRNO__MEM_ALLOC_FAILED ;
6529+ return TEP_ERRNO__MEM_ALLOC_FAILED ;
65306530 }
65316531
65326532 next_param = & (func_handle -> params );
@@ -6538,14 +6538,14 @@ int pevent_register_print_function(struct tep_handle *pevent,
65386538
65396539 if (type >= PEVENT_FUNC_ARG_MAX_TYPES ) {
65406540 do_warning ("Invalid argument type %d" , type );
6541- ret = PEVENT_ERRNO__INVALID_ARG_TYPE ;
6541+ ret = TEP_ERRNO__INVALID_ARG_TYPE ;
65426542 goto out_free ;
65436543 }
65446544
65456545 param = malloc (sizeof (* param ));
65466546 if (!param ) {
65476547 do_warning ("Failed to allocate function param" );
6548- ret = PEVENT_ERRNO__MEM_ALLOC_FAILED ;
6548+ ret = TEP_ERRNO__MEM_ALLOC_FAILED ;
65496549 goto out_free ;
65506550 }
65516551 param -> type = type ;
@@ -6654,7 +6654,7 @@ int pevent_register_event_handler(struct tep_handle *pevent, int id,
66546654 handle = calloc (1 , sizeof (* handle ));
66556655 if (!handle ) {
66566656 do_warning ("Failed to allocate event handler" );
6657- return PEVENT_ERRNO__MEM_ALLOC_FAILED ;
6657+ return TEP_ERRNO__MEM_ALLOC_FAILED ;
66586658 }
66596659
66606660 handle -> id = id ;
@@ -6669,7 +6669,7 @@ int pevent_register_event_handler(struct tep_handle *pevent, int id,
66696669 free ((void * )handle -> event_name );
66706670 free ((void * )handle -> sys_name );
66716671 free (handle );
6672- return PEVENT_ERRNO__MEM_ALLOC_FAILED ;
6672+ return TEP_ERRNO__MEM_ALLOC_FAILED ;
66736673 }
66746674
66756675 handle -> func = func ;
0 commit comments