From 1428d8461e92650f4414b3443bc6adc7cce70c49 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Thu, 12 Sep 2024 11:20:10 +0200 Subject: [PATCH] shared/shell: Add bt_shell_get_timeout() Make it possible to get the value of the general --timeout option. --- src/shared/shell.c | 5 +++++ src/shared/shell.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/shared/shell.c b/src/shared/shell.c index 246de209e..c31487190 100644 --- a/src/shared/shell.c +++ b/src/shared/shell.c @@ -1670,3 +1670,8 @@ void *bt_shell_get_env(const char *name) return env->value; } + +int bt_shell_get_timeout(void) +{ + return data.timeout; +} diff --git a/src/shared/shell.h b/src/shared/shell.h index a9a635bda..b03250cac 100644 --- a/src/shared/shell.h +++ b/src/shared/shell.h @@ -85,4 +85,6 @@ bool bt_shell_detach(void); void bt_shell_set_env(const char *name, void *value); void *bt_shell_get_env(const char *name); +int bt_shell_get_timeout(void); + void bt_shell_cleanup(void); -- 2.47.3