Re: [PATCH v2] mesh: Make meshctl use bt_shell helpers

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

 



Hi Luiz,

> @@ -2177,7 +1949,6 @@ int main(int argc, char *argv[])
>  	GOptionContext *context;
>  	GError *error = NULL;
>  	GDBusClient *client;
> -	guint signal;
>  	int len;
>  	int extra;
>  
> @@ -2196,22 +1967,22 @@ int main(int argc, char *argv[])
>  	g_option_context_free(context);
>  
>  	if (option_version == TRUE) {
> -		rl_printf("%s\n", VERSION);
> +		bt_shell_printf("%s\n", VERSION);
>  		exit(0);
>  	}
>  
>  	if (!mesh_config_dir) {
> -		rl_printf("Local config directory not provided.\n");
> +		bt_shell_printf("Local config directory not provided.\n");
>  		mesh_config_dir = "";
>  	} else {
> -		rl_printf("Reading prov_db.json and local_node.json from %s\n",
> +		bt_shell_printf("Reading prov_db.json and local_node.json from %s\n",
>  							mesh_config_dir);
>  	}
>  
>  	len = strlen(mesh_config_dir);
>  	if (len && mesh_config_dir[len - 1] != '/') {
>  		extra = 1;
> -		rl_printf("mesh_config_dir[%d] %s\n", len,
> +		bt_shell_printf("mesh_config_dir[%d] %s\n", len,
>  						&mesh_config_dir[len - 1]);
>  	} else {
>  		extra = 0;
> @@ -2257,18 +2028,11 @@ int main(int argc, char *argv[])
>  		exit(1);
>  	}
>  
> -	main_loop = g_main_loop_new(NULL, FALSE);
> -	dbus_conn = g_dbus_setup_bus(DBUS_BUS_SYSTEM, NULL, NULL);
> -
> -	setlinebuf(stdout);
> -
> -	rl_erase_empty_line = 1;
> -	rl_callback_handler_install(NULL, rl_handler);
> +	bt_shell_init(&argc, &argv);

meshctl will not output version with --version/-v.
Refer to the mail (shared/shell: Fix no version output with option) that I sent.


Regards,
Eramoto

--
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