From patchwork Tue May 13 09:38:12 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bastien Nocera X-Patchwork-Id: 889679 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E931E227581 for ; Tue, 13 May 2025 09:39:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.197 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747129160; cv=none; b=kLggoz9O61gL7ihA6Ez9jmweDdncUd71k0SC1Rb4sgEoxAZvI2v9cWJ8vYiaNA+NWyLkd+bL3clkEsJYYOUqhXT9dd9ITRRpTd4s5Y0JSCyhS4NlBmNabEOA5j6CZSpLGhLIu8oBIQCsDQ4yvMt/3PfwQ4xjxqIJVE/BfBmMNFk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747129160; c=relaxed/simple; bh=Q2vf5yICqTlGY8VMRGqQTFzWGnbPDoKDJfAP6kvIVrw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=h4a7Pv5506Anuk/JN46FhLB8lw7LsWMaoD8s8pje0kvpeUPbxHGGzL4HWYp4sdepPFqyxJnjSzxUlc4Tw3atiKGgGl59EBoo/q6t69Nlv0zAZd8cYvW3fRL+/5bRWlpnQ2SyUxikkPRHM8o+yz1ZIGlAYiBYTgAN7hrNJLZMBd4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=hadess.net; spf=pass smtp.mailfrom=hadess.net; arc=none smtp.client-ip=217.70.183.197 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=hadess.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=hadess.net Received: by mail.gandi.net (Postfix) with ESMTPSA id EA74643316; Tue, 13 May 2025 09:39:14 +0000 (UTC) From: Bastien Nocera To: linux-bluetooth@vger.kernel.org Cc: Bastien Nocera Subject: [BlueZ v4 2/9] client: Install submenus before contacting bluez daemon Date: Tue, 13 May 2025 11:38:12 +0200 Message-ID: <20250513093913.396876-3-hadess@hadess.net> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250513093913.396876-1-hadess@hadess.net> References: <20250513093913.396876-1-hadess@hadess.net> Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-GND-State: clean X-GND-Score: 0 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdeftdefjeelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecunecujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepuegrshhtihgvnhcupfhotggvrhgruceohhgruggvshhssehhrgguvghsshdrnhgvtheqnecuggftrfgrthhtvghrnhepveethfelveejffetkeelheehueejlefhvdehteehgfeghfekgfdvfefhgeekieetnecukfhppedvrgdtudemvgefgeemvggtjeefmegtfhdvtdemjeduuggrmeefsggumedvtdgrleemudeffeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvrgdtudemvgefgeemvggtjeefmegtfhdvtdemjeduuggrmeefsggumedvtdgrleemudeffedphhgvlhhopeholhhimhhpihgtrddrpdhmrghilhhfrhhomhephhgruggvshhssehhrgguvghsshdrnhgvthdpnhgspghrtghpthhtohepvddprhgtphhtthhopehlihhnuhigqdgslhhuvghtohhothhhsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtohephhgruggvshhssehhrgguvghsshdrnhgvth X-GND-Sasl: hadess@hadess.net So that the submenus are installed even if bluez isn't available. --- client/main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/client/main.c b/client/main.c index e35e89dd2362..9efa92380663 100644 --- a/client/main.c +++ b/client/main.c @@ -3403,6 +3403,11 @@ int main(int argc, char *argv[]) bt_shell_add_submenu(&advertise_monitor_menu); bt_shell_add_submenu(&scan_menu); bt_shell_add_submenu(&gatt_menu); + admin_add_submenu(); + player_add_submenu(); + mgmt_add_submenu(); + assistant_add_submenu(); + hci_add_submenu(); bt_shell_set_prompt(PROMPT_OFF, NULL); if (agent_option) @@ -3419,15 +3424,10 @@ int main(int argc, char *argv[]) bt_shell_set_env("AUTO_REGISTER_ENDPOINT", (void *)endpoint_option); - admin_add_submenu(); admin_enable_submenu(); - player_add_submenu(); player_enable_submenu(); - mgmt_add_submenu(); mgmt_enable_submenu(); - assistant_add_submenu(); assistant_enable_submenu(); - hci_add_submenu(); client = g_dbus_client_new(dbus_conn, "org.bluez", "/org/bluez"); From patchwork Tue May 13 09:38:13 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bastien Nocera X-Patchwork-Id: 889682 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E9389230264 for ; Tue, 13 May 2025 09:39:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.197 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747129158; cv=none; b=CO3ahuaKBG1+Tw5tOgm0GzmC3gpe0PdoABy7P+/eid023osGSkg+HqfmFHWDZJ3sosky1Or041ES8SF3UOnB2gWAgPtwpeu2uYb19uaEIIUw++UjmNZ0Pv6sh59hpwR3OdamefMX2wG9faz7raCy6nBPtOec4bxNbEzH01WodrY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747129158; c=relaxed/simple; bh=OUngSD58PFhMf38hQbPwnyHfr75JF7xeUivQ8brPLMA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pRxscNcizARwMlR/AfGHU0m7pnLyFlyVyOS6Meeg25ihI5ZG4ExSGOJEYQBB6whTNXOkviYlO0y1kIzw4cZPi13IX7eVCZVeYxygVNY1BgDFBk9YcYlotCF3RHtnOI+i+S9UQtgKTghsx2qxtWL1IjAcTIlRF6V4qpucCPvBfnE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=hadess.net; spf=pass smtp.mailfrom=hadess.net; arc=none smtp.client-ip=217.70.183.197 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=hadess.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=hadess.net Received: by mail.gandi.net (Postfix) with ESMTPSA id 39E9B439F0; Tue, 13 May 2025 09:39:15 +0000 (UTC) From: Bastien Nocera To: linux-bluetooth@vger.kernel.org Cc: Bastien Nocera Subject: [BlueZ v4 3/9] shared/shell: Add function to handle early help calls Date: Tue, 13 May 2025 11:38:13 +0200 Message-ID: <20250513093913.396876-4-hadess@hadess.net> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250513093913.396876-1-hadess@hadess.net> References: <20250513093913.396876-1-hadess@hadess.net> Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-GND-State: clean X-GND-Score: 0 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdeftdefjeelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecunecujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepuegrshhtihgvnhcupfhotggvrhgruceohhgruggvshhssehhrgguvghsshdrnhgvtheqnecuggftrfgrthhtvghrnhepveethfelveejffetkeelheehueejlefhvdehteehgfeghfekgfdvfefhgeekieetnecukfhppedvrgdtudemvgefgeemvggtjeefmegtfhdvtdemjeduuggrmeefsggumedvtdgrleemudeffeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvrgdtudemvgefgeemvggtjeefmegtfhdvtdemjeduuggrmeefsggumedvtdgrleemudeffedphhgvlhhopeholhhimhhpihgtrddrpdhmrghilhhfrhhomhephhgruggvshhssehhrgguvghsshdrnhgvthdpnhgspghrtghpthhtohepvddprhgtphhtthhopehlihhnuhigqdgslhhuvghtohhothhhsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtohephhgruggvshhssehhrgguvghsshdrnhgvth X-GND-Sasl: hadess@hadess.net Add a function that would allow tools to exit after handling --help, so as to avoid the daemon waiting to communicate with a D-Bus service that might not be running. --- src/shared/shell.c | 10 ++++++++++ src/shared/shell.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/src/shared/shell.c b/src/shared/shell.c index 674992065744..4e42bd69b4d7 100644 --- a/src/shared/shell.c +++ b/src/shared/shell.c @@ -1708,3 +1708,13 @@ int bt_shell_get_timeout(void) { return data.timeout; } + +void bt_shell_handle_non_interactive_help(void) +{ + if (!data.mode) + return; + if (data.argv[0] != cmplt) + return; + print_cmds(); + exit(EXIT_SUCCESS); +} diff --git a/src/shared/shell.h b/src/shared/shell.h index e431db9f5821..eebbc71faffb 100644 --- a/src/shared/shell.h +++ b/src/shared/shell.h @@ -60,6 +60,8 @@ int bt_shell_exec(const char *input); void bt_shell_quit(int status); void bt_shell_noninteractive_quit(int status); +void bt_shell_handle_non_interactive_help(void); + bool bt_shell_set_menu(const struct bt_shell_menu *menu); bool bt_shell_add_submenu(const struct bt_shell_menu *menu); From patchwork Tue May 13 09:38:14 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bastien Nocera X-Patchwork-Id: 889681 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7254B238157 for ; Tue, 13 May 2025 09:39:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.197 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747129159; cv=none; b=GyW2daFN4jtYYS/L7RG2RUzACYZ8B/w1LPP3cXqWJ46Vye+oToY4g+vrG1/nIjm6IyByz/haXtWQvOrd7WfidJLTertVApT+wlOzCQHoXC8zS0olBsRdHBMwwUYylMuN/mad6g7U/9RVc4EMsoxiYeKtyLOoiaCtRITskmvmAmM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747129159; c=relaxed/simple; bh=rP4xnHSEQGShtOILaxBTO4XeLMQHI9603DBB20hwl9g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pNGRZDjju0g7kBpHzdvfQO30ffLMzOMTptn7mavFidl89mtQvSfnhG5rkhpQwOvMxQedw0X6I/WVmcI7l43fBZRL/x3lDGW/wtKwtlR/tHZftMVKMXqDeG6pJIWq+jW0LQTWS5l7feFNB3j4XZWBcFlGH3YhVktB3zJyU42ArRA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=hadess.net; spf=pass smtp.mailfrom=hadess.net; arc=none smtp.client-ip=217.70.183.197 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=hadess.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=hadess.net Received: by mail.gandi.net (Postfix) with ESMTPSA id 7EEB543319; Tue, 13 May 2025 09:39:15 +0000 (UTC) From: Bastien Nocera To: linux-bluetooth@vger.kernel.org Cc: Bastien Nocera Subject: [BlueZ v4 4/9] client: Fix --help hanging if bluetoothd is not running Date: Tue, 13 May 2025 11:38:14 +0200 Message-ID: <20250513093913.396876-5-hadess@hadess.net> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250513093913.396876-1-hadess@hadess.net> References: <20250513093913.396876-1-hadess@hadess.net> Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-GND-State: clean X-GND-Score: 0 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdeftdefjeelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecunecujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepuegrshhtihgvnhcupfhotggvrhgruceohhgruggvshhssehhrgguvghsshdrnhgvtheqnecuggftrfgrthhtvghrnhepveethfelveejffetkeelheehueejlefhvdehteehgfeghfekgfdvfefhgeekieetnecukfhppedvrgdtudemvgefgeemvggtjeefmegtfhdvtdemjeduuggrmeefsggumedvtdgrleemudeffeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvrgdtudemvgefgeemvggtjeefmegtfhdvtdemjeduuggrmeefsggumedvtdgrleemudeffedphhgvlhhopeholhhimhhpihgtrddrpdhmrghilhhfrhhomhephhgruggvshhssehhrgguvghsshdrnhgvthdpnhgspghrtghpthhtohepvddprhgtphhtthhopehlihhnuhigqdgslhhuvghtohhothhhsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtohephhgruggvshhssehhrgguvghsshdrnhgvth X-GND-Sasl: hadess@hadess.net Exit after printing all the main and submenu commands. --- client/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/main.c b/client/main.c index 9efa92380663..c536a179dc7a 100644 --- a/client/main.c +++ b/client/main.c @@ -3410,6 +3410,8 @@ int main(int argc, char *argv[]) hci_add_submenu(); bt_shell_set_prompt(PROMPT_OFF, NULL); + bt_shell_handle_non_interactive_help(); + if (agent_option) auto_register_agent = g_strdup(agent_option); else From patchwork Tue May 13 09:38:18 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bastien Nocera X-Patchwork-Id: 889678 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AC5D921CA0F for ; Tue, 13 May 2025 09:39:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.197 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747129160; cv=none; b=cqGgZW1YRsdznnbLiJVnN1PUyXk6XJKYgqaAi+2fE166rts5tP899/90g2jEvhL/wal/zwdU/t56MtySKZ1ca/KKWj20qtgzRzQRRbrHICvbjOKDoIb5DvD+suv7xHBx4q7wnI2vpHLcBwnnfdpv/8rojg2+Gqb4cNYesKUIwi4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747129160; c=relaxed/simple; bh=X6/H8cwgL8HO9t19tqVd1eFI+bBujc6jfENilHdPc3M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dCHuoJyGji/upXMGJFQTraAnRtpqhA5a10PJw6t7LPlF33VQCNM2WOnLaaql/HLyvggP/2yV0LTCZNkIovMyc7kV6Dob4ojZKeCoyH8OaG7Q7y4LxaJ+GwtZmrTzs6vLeU7PHS/g7xlOMs487otbe9w4S7d8BDNIrSOF4js8Mss= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=hadess.net; spf=pass smtp.mailfrom=hadess.net; arc=none smtp.client-ip=217.70.183.197 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=hadess.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=hadess.net Received: by mail.gandi.net (Postfix) with ESMTPSA id 9F072432F5; Tue, 13 May 2025 09:39:16 +0000 (UTC) From: Bastien Nocera To: linux-bluetooth@vger.kernel.org Cc: Bastien Nocera Subject: [BlueZ v4 8/9] client: Port "mgmt" menu to pre_run Date: Tue, 13 May 2025 11:38:18 +0200 Message-ID: <20250513093913.396876-9-hadess@hadess.net> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250513093913.396876-1-hadess@hadess.net> References: <20250513093913.396876-1-hadess@hadess.net> Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-GND-State: clean X-GND-Score: 0 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdeftdefjeelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecunecujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepuegrshhtihgvnhcupfhotggvrhgruceohhgruggvshhssehhrgguvghsshdrnhgvtheqnecuggftrfgrthhtvghrnhepveethfelveejffetkeelheehueejlefhvdehteehgfeghfekgfdvfefhgeekieetnecukfhppedvrgdtudemvgefgeemvggtjeefmegtfhdvtdemjeduuggrmeefsggumedvtdgrleemudeffeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvrgdtudemvgefgeemvggtjeefmegtfhdvtdemjeduuggrmeefsggumedvtdgrleemudeffedphhgvlhhopeholhhimhhpihgtrddrpdhmrghilhhfrhhomhephhgruggvshhssehhrgguvghsshdrnhgvthdpnhgspghrtghpthhtohepvddprhgtphhtthhopehlihhnuhigqdgslhhuvghtohhothhhsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtohephhgruggvshhssehhrgguvghsshdrnhgvth X-GND-Sasl: hadess@hadess.net --- client/main.c | 1 - client/mgmt.c | 14 +++++++++++--- client/mgmt.h | 1 - tools/btmgmt.c | 5 ----- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/client/main.c b/client/main.c index ce753c1ac4c4..06ae25c9d8e9 100644 --- a/client/main.c +++ b/client/main.c @@ -3426,7 +3426,6 @@ int main(int argc, char *argv[]) bt_shell_set_env("AUTO_REGISTER_ENDPOINT", (void *)endpoint_option); - mgmt_enable_submenu(); assistant_enable_submenu(); client = g_dbus_client_new(dbus_conn, "org.bluez", "/org/bluez"); diff --git a/client/mgmt.c b/client/mgmt.c index 6c6d62f4bba1..eda68b25a3e9 100644 --- a/client/mgmt.c +++ b/client/mgmt.c @@ -71,6 +71,8 @@ static int pending_index = 0; #define MIN(x, y) ((x) < (y) ? (x) : (y)) #endif +static void mgmt_menu_pre_run(const struct bt_shell_menu *menu); + #define PROMPT_ON COLOR_BLUE "[mgmt]" COLOR_OFF "> " static void update_prompt(uint16_t index) @@ -5998,6 +6000,7 @@ static const struct bt_shell_menu monitor_menu = { static const struct bt_shell_menu mgmt_menu = { .name = "mgmt", .desc = "Management Submenu", + .pre_run = mgmt_menu_pre_run, .entries = { { "select", "", cmd_select, "Select a different index" }, @@ -6175,12 +6178,17 @@ void mgmt_add_submenu(void) bt_shell_add_submenu(&monitor_menu); } -bool mgmt_enable_submenu(void) +static bool pre_run_done = false; + +static void mgmt_menu_pre_run(const struct bt_shell_menu *menu) { + if (pre_run_done) + return; + mgmt = mgmt_new_default(); if (!mgmt) { fprintf(stderr, "Unable to open mgmt_socket\n"); - return false; + return; } if (getenv("MGMT_DEBUG")) @@ -6188,7 +6196,7 @@ bool mgmt_enable_submenu(void) register_mgmt_callbacks(mgmt, mgmt_index); - return true; + pre_run_done = true; } void mgmt_remove_submenu(void) diff --git a/client/mgmt.h b/client/mgmt.h index b0f3cafd0777..6d235fbb1388 100644 --- a/client/mgmt.h +++ b/client/mgmt.h @@ -9,6 +9,5 @@ */ void mgmt_add_submenu(void); -bool mgmt_enable_submenu(void); void mgmt_remove_submenu(void); void mgmt_set_index(const char *arg); diff --git a/tools/btmgmt.c b/tools/btmgmt.c index 0f6051d5befe..0f3de2880014 100644 --- a/tools/btmgmt.c +++ b/tools/btmgmt.c @@ -47,11 +47,6 @@ int main(int argc, char *argv[]) bt_shell_init(argc, argv, &opt); mgmt_add_submenu(); - if (!mgmt_enable_submenu()) { - fprintf(stderr, "Unable to open mgmt_socket\n"); - return EXIT_FAILURE; - } - mgmt_set_index(index_option); bt_shell_attach(fileno(stdin)); status = bt_shell_run();