diff mbox series

libtracefs: Fix tracefs_instance_set_buffer_size() for individual CPUs

Message ID 20230103183846.5ffdef36@gandalf.local.home (mailing list archive)
State Accepted
Commit eeafd61b7de34e4f3ccbde3356f88ac2cd36234e
Headers show
Series libtracefs: Fix tracefs_instance_set_buffer_size() for individual CPUs | expand

Commit Message

Steven Rostedt Jan. 3, 2023, 11:38 p.m. UTC
From: "Steven Rostedt (Google)" <rostedt@goodmis.org>

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.

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>
---
 src/tracefs-instance.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/src/tracefs-instance.c b/src/tracefs-instance.c
index 6905f61ff929..57f5c7f9a000 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);