Lines Matching +full:directory +full:- +full:level
1 // SPDX-License-Identifier: LGPL-2.1
18 #include <event-parse.h>
19 #include <event-utils.h>
21 #include "tracefs-local.h"
35 * tracefs_set_loglevel - set log level of the library
36 * @level: desired level of the library messages
38 void tracefs_set_loglevel(enum tep_loglevel level) in tracefs_set_loglevel() argument
40 log_level = level; in tracefs_set_loglevel()
41 tep_set_loglevel(level); in tracefs_set_loglevel()
64 return -1; in mount_tracefs()
80 return -1; in mount_debugfs()
164 * tracefs_tracing_dir_is_mounted - test if the tracing dir is already mounted
166 * @path: the path to the tracing directory if mounted or was mounted
168 * Returns 1 if the tracing directory is already mounted and 0 if it is not.
169 * If @mount is set and it fails to mount, it returns -1.
171 * If path is not NULL, and the tracing directory is or was mounted, it holds
172 * the path to the tracing directory. It must not be freed.
189 return -1; in tracefs_tracing_dir_is_mounted()
196 * trace_find_tracing_dir - Find tracing directory
197 * @debugfs: Boolean to just return the debugfs directory
199 * Returns string containing the full path to the system's tracing directory.
208 * tracefs_set_tracing_dir - Set location of the tracing directory
209 * @tracing_dir: full path to the system's tracing directory mount point.
211 * Set the location to the system's tracing directory. This API should be used
212 * to set a custom location of the tracing directory. There is no need to call
215 * Returns 0 on success, -1 otherwise.
227 return -1; in tracefs_set_tracing_dir()
233 /* Used to check if the directory is still mounted */
244 * tracefs_tracing_dir - Get tracing directory
246 * Returns string containing the full path to the system's tracing directory.
265 * tracefs_debug_dir - Get debugfs directory path
267 * Returns string containing the full path to the system's debugfs directory.
283 * tracefs_get_tracing_file - Get tracing file
287 * the system's tracing directory.
312 * tracefs_put_tracing_file - Free tracing file or directory name
314 * Frees tracing file or directory, returned by
335 return -1; in str_read_file()
346 size = -1; in str_read_file()
365 * tracefs_error_all - return the content of the error log
366 * @instance: The instance to read the error log from (NULL for top level)
398 * tracefs_error_last - return the last error logged
399 * @instance: The instance to read the error log from (NULL for top level)
422 for (i = size - 1; i > 0; i--) { in tracefs_error_last()
461 * tracefs_error_clear - clear the error log of an instance
462 * @instance: The instance to clear (NULL for top level)
466 * Returns 0 on success, -1 otherwise.
474 * tracefs_list_free - free list if strings, returned by APIs
491 list--; in tracefs_list_free()
506 * tracefs_list_add - create or extend a string list
537 list--; in tracefs_list_add()
557 * trace_list_pop - Removes the last string added
560 * Returns 0 on success, -1 on error.
570 list--; in trace_list_pop()
574 return -1; in trace_list_pop()
575 size--; in trace_list_pop()
583 * tracefs_list_size - Return the number of strings in the list
594 list--; in tracefs_list_size()
599 * tracefs_tracer_available - test if a tracer is available
600 * @tracing_dir: The directory that contains the tracing directory