public inbox for dtrace@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH 1/4] btf: btf argument to dt_btf_get_string() should be const
@ 2026-04-14  6:27 Kris Van Hees
  2026-04-17 17:02 ` Nick Alcock
  0 siblings, 1 reply; 2+ messages in thread
From: Kris Van Hees @ 2026-04-14  6:27 UTC (permalink / raw)
  To: dtrace, dtrace-devel

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
---
 libdtrace/dt_btf.c | 2 +-
 libdtrace/dt_btf.h | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/libdtrace/dt_btf.c b/libdtrace/dt_btf.c
index 1f6dfd54d..d08599192 100644
--- a/libdtrace/dt_btf.c
+++ b/libdtrace/dt_btf.c
@@ -849,7 +849,7 @@ dt_btf_type_by_id(dtrace_hdl_t *dtp, const dt_btf_t *btf, int32_t id)
 }
 
 const char *
-dt_btf_get_string(dtrace_hdl_t *dtp, dt_btf_t *btf, uint32_t off)
+dt_btf_get_string(dtrace_hdl_t *dtp, const dt_btf_t *btf, uint32_t off)
 {
 	if (dtp->dt_shared_btf == NULL)
 		goto ok;
diff --git a/libdtrace/dt_btf.h b/libdtrace/dt_btf.h
index 3e5f53622..d956ad940 100644
--- a/libdtrace/dt_btf.h
+++ b/libdtrace/dt_btf.h
@@ -20,7 +20,8 @@ typedef struct bpf_btf_info	btf_info_t;
 extern void dt_btf_destroy(dtrace_hdl_t *, dt_btf_t *);
 extern dt_btf_t *dt_btf_load_module(dtrace_hdl_t *, dt_module_t *);
 extern ctf_dict_t *dt_btf_module_ctf(dtrace_hdl_t *, dt_module_t *);
-extern const char *dt_btf_get_string(dtrace_hdl_t *, dt_btf_t *, uint32_t);
+extern const char *dt_btf_get_string(dtrace_hdl_t *, const dt_btf_t *,
+				     uint32_t);
 extern int32_t dt_btf_lookup_name_kind(dtrace_hdl_t *, dt_module_t *,
 				       const char *, uint32_t);
 extern int dt_btf_func_argc(dtrace_hdl_t *dtp, const dt_btf_t *btf,
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-04-17 17:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-14  6:27 [PATCH 1/4] btf: btf argument to dt_btf_get_string() should be const Kris Van Hees
2026-04-17 17:02 ` Nick Alcock

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox