summaryrefslogtreecommitdiffstats
path: root/firmware/buflib.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/buflib.c')
-rw-r--r--firmware/buflib.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/firmware/buflib.c b/firmware/buflib.c
index f6a565715d..294d2926d3 100644
--- a/firmware/buflib.c
+++ b/firmware/buflib.c
@@ -898,6 +898,15 @@ const char* buflib_get_name(struct buflib_context *ctx, int handle)
}
#ifdef DEBUG
+
+void *buflib_get_data(struct buflib_context *ctx, int handle)
+{
+ if (handle <= 0)
+ buflib_panic(ctx, "invalid handle access: %d", handle);
+
+ return (void*)(ctx->handle_table[-handle].alloc);
+}
+
void buflib_check_valid(struct buflib_context *ctx)
{
union buflib_data *crc_slot;