[PATCH BlueZ 7/8] tools/btmgmt: Change help message of some commands to usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Display the usage including the command name even if passing an invalid
argument.
---
 tools/btmgmt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/btmgmt.c b/tools/btmgmt.c
index ee2cb18..8eee2b1 100644
--- a/tools/btmgmt.c
+++ b/tools/btmgmt.c
@@ -1790,7 +1790,7 @@ done:
 static bool parse_setting(int argc, char **argv, uint8_t *val)
 {
 	if (argc < 2) {
-		print("Specify \"on\" or \"off\"");
+		cmd_usage(argv[0]);
 		return false;
 	}
 
@@ -1893,7 +1893,7 @@ static void cmd_sc(struct mgmt *mgmt, uint16_t index, int argc, char **argv)
 	uint8_t val;
 
 	if (argc < 2) {
-		print("Specify \"on\" or \"off\" or \"only\"");
+		cmd_usage(argv[0]);
 		return noninteractive_quit(EXIT_FAILURE);
 	}
 
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux