aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/traceevent/event-parse-api.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/lib/traceevent/event-parse-api.c')
-rw-r--r--tools/lib/traceevent/event-parse-api.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/tools/lib/traceevent/event-parse-api.c b/tools/lib/traceevent/event-parse-api.c
index 002b3f73862b..f7184575f0d9 100644
--- a/tools/lib/traceevent/event-parse-api.c
+++ b/tools/lib/traceevent/event-parse-api.c
@@ -155,10 +155,10 @@ int tep_get_header_page_size(struct tep_handle *pevent)
155} 155}
156 156
157/** 157/**
158 * tep_get_header_timestamp_size - get size of the time stamp in the header page 158 * tep_get_header_timestamp_size - get size of the timestamp in the header page
159 * @tep: a handle to the tep_handle 159 * @tep: a handle to the tep_handle
160 * 160 *
161 * This returns size of the time stamp in the header page 161 * This returns size of the timestamp in the header page
162 * If @tep is NULL, 0 is returned. 162 * If @tep is NULL, 0 is returned.
163 */ 163 */
164int tep_get_header_timestamp_size(struct tep_handle *tep) 164int tep_get_header_timestamp_size(struct tep_handle *tep)
@@ -249,17 +249,17 @@ void tep_set_page_size(struct tep_handle *pevent, int _page_size)
249} 249}
250 250
251/** 251/**
252 * tep_file_bigendian - get if the file is in big endian order 252 * tep_is_file_bigendian - return the endian of the file
253 * @pevent: a handle to the tep_handle 253 * @pevent: a handle to the tep_handle
254 * 254 *
255 * This returns if the file is in big endian order 255 * This returns true if the file is in big endian order
256 * If @pevent is NULL, 0 is returned. 256 * If @pevent is NULL, false is returned.
257 */ 257 */
258int tep_file_bigendian(struct tep_handle *pevent) 258bool tep_is_file_bigendian(struct tep_handle *pevent)
259{ 259{
260 if (pevent) 260 if (pevent)
261 return pevent->file_bigendian; 261 return pevent->file_bigendian == TEP_BIG_ENDIAN;
262 return 0; 262 return false;
263} 263}
264 264
265/** 265/**
@@ -276,27 +276,27 @@ void tep_set_file_bigendian(struct tep_handle *pevent, enum tep_endian endian)
276} 276}
277 277
278/** 278/**
279 * tep_is_host_bigendian - get if the order of the current host is big endian 279 * tep_is_local_bigendian - return the endian of the saved local machine
280 * @pevent: a handle to the tep_handle 280 * @pevent: a handle to the tep_handle
281 * 281 *
282 * This gets if the order of the current host is big endian 282 * This returns true if the saved local machine in @pevent is big endian.
283 * If @pevent is NULL, 0 is returned. 283 * If @pevent is NULL, false is returned.
284 */ 284 */
285int tep_is_host_bigendian(struct tep_handle *pevent) 285bool tep_is_local_bigendian(struct tep_handle *pevent)
286{ 286{
287 if (pevent) 287 if (pevent)
288 return pevent->host_bigendian; 288 return pevent->host_bigendian == TEP_BIG_ENDIAN;
289 return 0; 289 return 0;
290} 290}
291 291
292/** 292/**
293 * tep_set_host_bigendian - set the order of the local host 293 * tep_set_local_bigendian - set the stored local machine endian order
294 * @pevent: a handle to the tep_handle 294 * @pevent: a handle to the tep_handle
295 * @endian: non zero, if the local host has big endian order 295 * @endian: non zero, if the local host has big endian order
296 * 296 *
297 * This sets the order of the local host 297 * This sets the endian order for the local machine.
298 */ 298 */
299void tep_set_host_bigendian(struct tep_handle *pevent, enum tep_endian endian) 299void tep_set_local_bigendian(struct tep_handle *pevent, enum tep_endian endian)
300{ 300{
301 if (pevent) 301 if (pevent)
302 pevent->host_bigendian = endian; 302 pevent->host_bigendian = endian;
@@ -306,14 +306,14 @@ void tep_set_host_bigendian(struct tep_handle *pevent, enum tep_endian endian)
306 * tep_is_latency_format - get if the latency output format is configured 306 * tep_is_latency_format - get if the latency output format is configured
307 * @pevent: a handle to the tep_handle 307 * @pevent: a handle to the tep_handle
308 * 308 *
309 * This gets if the latency output format is configured 309 * This returns true if the latency output format is configured
310 * If @pevent is NULL, 0 is returned. 310 * If @pevent is NULL, false is returned.
311 */ 311 */
312int tep_is_latency_format(struct tep_handle *pevent) 312bool tep_is_latency_format(struct tep_handle *pevent)
313{ 313{
314 if (pevent) 314 if (pevent)
315 return pevent->latency_format; 315 return pevent->latency_format;
316 return 0; 316 return false;
317} 317}
318 318
319/** 319/**