Re: [PATCH BlueZ 2/3] core: Add DisableProfiles entry to main.conf

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

 



Hi Luiz,


> This entry can be used to globally disable profiles, this is specially
> useful for qualification purposes where some platforms may decide to
> only qualify a subset of the supported profiles.
> ---
> src/hcid.h    |  1 +
> src/main.c    | 10 ++++++++++
> src/main.conf |  4 ++++
> src/profile.c | 24 ++++++++++++++++++++++++
> 4 files changed, 39 insertions(+)
> 
> diff --git a/src/hcid.h b/src/hcid.h
> index ea67cc2..f465a2b 100644
> --- a/src/hcid.h
> +++ b/src/hcid.h
> @@ -32,6 +32,7 @@ struct main_opts {
> 	gboolean	reverse_sdp;
> 	gboolean	name_resolv;
> 	gboolean	debug_keys;
> +	char		**disabled_profiles;
> 
> 	uint16_t	did_source;
> 	uint16_t	did_vendor;
> diff --git a/src/main.c b/src/main.c
> index 1e40ebc..933c20f 100644
> --- a/src/main.c
> +++ b/src/main.c
> @@ -76,6 +76,7 @@ static const char * const supported_options[] = {
> 	"ReverseServiceDiscovery",
> 	"NameResolving",
> 	"DebugKeys",
> +	"DisableProfiles"
> };
> 
> static GKeyFile *load_config(const char *file)
> @@ -263,6 +264,15 @@ static void parse_config(GKeyFile *config)
> 		g_clear_error(&err);
> 	else
> 		main_opts.debug_keys = boolean;
> +
> +	str = g_key_file_get_string(config, "General", "DisableProfiles", &err);
> +	if (err) {
> +		DBG("%s", err->message);
> +		g_clear_error(&err);
> +	} else {
> +		main_opts.disabled_profiles = g_strsplit(str, " ", -1);
> +		g_free(str);
> +	}
> }

I am not a huge fan of adding this one back. Do we really need it?

Regards

Marcel

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