gt: Fix existing help messages to be more consistent
authorPawel Szewczyk <p.szewczyk@samsung.com>
Thu, 2 Jul 2015 14:47:56 +0000 (16:47 +0200)
committerPawel Szewczyk <p.szewczyk@samsung.com>
Tue, 7 Jul 2015 12:26:28 +0000 (14:26 +0200)
Change-Id: I65a080df6e3a639f62885b314e2c5fc9706033db
Signed-off-by: Pawel Szewczyk <p.szewczyk@samsung.com>
source/config/src/configuration.c
source/function/src/function.c
source/gadget/src/gadget.c

index 3b2fa82..5871187 100644 (file)
@@ -52,9 +52,12 @@ static void gt_config_create_destructor(void *data)
 
 static int gt_config_create_help(void *data)
 {
-       printf("usage: %s config create GADGET_NAME <cf_label>  <cfg_id> <-f>\n"
+       printf("usage: %s config create [options] <gadget_name> <cfg_label> <cfg_id>\n"
               "Add new config to gadget.\n"
-              "\n",
+              "\n"
+              "Options:"
+              "-f, --force\tOverride config if config with given name already exists"
+              "-h, --help\tPrint this help",
               program_name);
        return 0;
 }
@@ -276,7 +279,7 @@ out:
 
 static int gt_config_add_help(void *data)
 {
-       printf("usage: %s config add GADGET_NAME <cfg_id> <cf_label> <func_type> <func_instance>\n"
+       printf("usage: %s config add <gadget_name> <cfg_label> <cfg_id> <func_type> <func_instance>\n"
               "Add function to specific configuration.\n"
               "\n",
               program_name);
index 6a42310..1e9c4a7 100644 (file)
@@ -44,7 +44,7 @@ static void gt_func_create_destructor(void *data)
 
 static int gt_func_create_help(void *data)
 {
-       printf("usage: %s func create GADGET_NAME FUNCTION_TYPE FUNCTION_NAME\n"
+       printf("usage: %s func create <gadget_name> <function_type> <function_name>\n"
               "Create new function of specified type (refer to `gt func list-types')\n",
                program_name);
        return 0;
@@ -140,7 +140,7 @@ out:
 
 static int gt_func_list_types_help(void *data)
 {
-       printf("%s func list-types\n"
+       printf("usage: %s func list-types\n"
               "List available function types.\n",
                program_name);
        return 0;
@@ -284,7 +284,7 @@ static void gt_func_func_destructor(void *data)
 
 static int gt_func_func_help(void *data)
 {
-       printf("usage: %s func COMMAND\n"
+       printf("usage: %s func [command] ...\n"
               "Manipulate USB function - both in-kernel and functionfs-based\n\n",
                program_name);
 
index 104dbdb..52060ca 100644 (file)
@@ -91,7 +91,7 @@ static int gt_gadget_create_help(void *data)
 {
        int i;
 
-       printf("usage: %s create NAME [attr=value]...\n"
+       printf("usage: %s create <name> [attr=value]...\n"
               "Create new gadget of specified name, attributes and language strings.\n"
               "\n"
               "Attributes:\n",
@@ -192,7 +192,7 @@ out:
 
 static int gt_gadget_rm_help(void *data)
 {
-       printf("usage: %s rm [OPTIONS] NAME \n"
+       printf("usage: %s rm [options] <name> \n"
               "Remove gadget of specified name\n"
               "\n"
               "Options:\n"