aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSteven Rostedt (VMware) <rostedt@goodmis.org>2021-07-22 09:36:07 -0400
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2021-07-22 16:02:58 -0400
commit4efc53c8b539463a6a01dea8e0d05d1bd0104657 (patch)
tree407f0ff2cf1e06d76d2ad06cdb7c0a1b8f868afa /include
parentec3c235324ca564e716b9a041fa3dc8f666545d5 (diff)
downloadlibtracefs-4efc53c8b539463a6a01dea8e0d05d1bd0104657.tar.gz
libtracefs: Add tracefs_list_pop() to remove the last item
Add a way to remove the last item of a string list. This will be needed to revert changes made to the new tracefs_synth structure that will have more than one tracefs_list char ** that must be the same size. If one is successfully updated, but the next one fails, the first one needs to be reverted. Link: https://lore.kernel.org/linux-trace-devel/20210722133610.379933-2-rostedt@goodmis.org Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'include')
-rw-r--r--include/tracefs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/tracefs.h b/include/tracefs.h
index 2649417..4dd77b9 100644
--- a/include/tracefs.h
+++ b/include/tracefs.h
@@ -66,6 +66,7 @@ int tracefs_error_clear(struct tracefs_instance *instance);
void tracefs_list_free(char **list);
char **tracefs_list_add(char **list, const char *string);
int tracefs_list_size(char **list);
+int tracefs_list_pop(char **list);
/**
* tracefs_trace_on_get_fd - Get a file descriptor of "tracing_on" in given instance