Upgrade bluez5_37 :Merge the code from private
[platform/upstream/bluez.git] / monitor / main.c
index 90ecf35..0457734 100644 (file)
@@ -61,6 +61,7 @@ static void usage(void)
                "\t-w, --write <file>     Save traces in btsnoop format\n"
                "\t-a, --analyze <file>   Analyze traces in btsnoop format\n"
                "\t-s, --server <socket>  Start monitor server socket\n"
+               "\t-p, --priority <level> Show only priority or lower\n"
                "\t-i, --index <num>      Show only specified controller\n"
                "\t-t, --time             Show time instead of time offset\n"
                "\t-T, --date             Show time and date information\n"
@@ -78,6 +79,7 @@ static const struct option main_options[] = {
        { "write",   required_argument, NULL, 'w' },
        { "analyze", required_argument, NULL, 'a' },
        { "server",  required_argument, NULL, 's' },
+       { "priority",required_argument, NULL, 'p' },
        { "index",   required_argument, NULL, 'i' },
        { "time",    no_argument,       NULL, 't' },
        { "date",    no_argument,       NULL, 'T' },
@@ -117,10 +119,10 @@ int main(int argc, char *argv[])
                int opt;
 
 #ifdef __TIZEN_PATCH__
-               opt = getopt_long(argc, argv, "r:w:a:s:i:tTSE:C:W:vh",
+               opt = getopt_long(argc, argv, "r:w:a:s:p:i:tTSE:C:W:vh",
                                                main_options, NULL);
 #else
-               opt = getopt_long(argc, argv, "r:w:a:s:i:tTSE:vh",
+               opt = getopt_long(argc, argv, "r:w:a:s:p:i:tTSE:vh",
                                                main_options, NULL);
 #endif
                if (opt < 0)
@@ -139,6 +141,9 @@ int main(int argc, char *argv[])
                case 's':
                        control_server(optarg);
                        break;
+               case 'p':
+                       packet_set_priority(optarg);
+                       break;
                case 'i':
                        if (strlen(optarg) > 3 && !strncmp(optarg, "hci", 3))
                                str = optarg + 3;