diff options
author | Steven Rostedt (Google) <rostedt@goodmis.org> | 2023-01-03 18:38:46 -0500 |
---|---|---|
committer | Steven Rostedt (Google) <rostedt@goodmis.org> | 2023-01-03 18:48:11 -0500 |
commit | eeafd61b7de34e4f3ccbde3356f88ac2cd36234e (patch) | |
tree | 769c0d72f67e61a876cc21d1d089940cdaa7dafb | |
parent | 6476bc3b39f3e4dad6d2d9baa0e7a491fa08d8fc (diff) | |
download | libtracefs-eeafd61b7de34e4f3ccbde3356f88ac2cd36234e.tar.gz |
libtracefs: Fix tracefs_instance_set_buffer_size() for individual CPUs
The tracefs_instance_set_buffer_size() function, when passed an update for
an individual CPU, writes in "val" and not val (the string that holds the
value to set). This is obviously wrong. Fix it.
Link: https://lore.kernel.org/linux-trace-devel/20230103183846.5ffdef36@gandalf.local.home
Fixes: 48c026fbb430e ("libtracefs: Add tracefs_instance_set_buffer_size() API")
Reported-by: Ching-lin Yu <chinglinyu@google.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
-rw-r--r-- | src/tracefs-instance.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tracefs-instance.c b/src/tracefs-instance.c index 6905f61..57f5c7f 100644 --- a/src/tracefs-instance.c +++ b/src/tracefs-instance.c @@ -419,7 +419,7 @@ int tracefs_instance_set_buffer_size(struct tracefs_instance *instance, size_t s return ret; } - ret = tracefs_instance_file_write(instance, path, "val"); + ret = tracefs_instance_file_write(instance, path, val); free(path); } free(val); |