diff mbox series

[BlueZ,1/7] profile: Add support for experimental flag

Message ID 20230515210545.718701-1-luiz.dentz@gmail.com (mailing list archive)
State Superseded
Headers show
Series [BlueZ,1/7] profile: Add support for experimental flag | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/CheckPatch success CheckPatch PASS
tedd_an/GitLint success Gitlint PASS
tedd_an/BuildEll success Build ELL PASS
tedd_an/BluezMake success Bluez Make PASS
tedd_an/MakeCheck success Bluez Make Check PASS
tedd_an/MakeDistcheck success Make Distcheck PASS
tedd_an/CheckValgrind success Check Valgrind PASS
tedd_an/CheckSmatch success CheckSparse PASS
tedd_an/bluezmakeextell success Make External ELL PASS
tedd_an/IncrementalBuild success Incremental Build PASS
tedd_an/ScanBuild success Scan Build PASS

Commit Message

Luiz Augusto von Dentz May 15, 2023, 9:05 p.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This adds experimental field to btd_profile so the plugin can indicate
drivers that depends on experimental to be enabled.
---
 src/profile.c | 6 ++++++
 src/profile.h | 5 +++++
 2 files changed, 11 insertions(+)

Comments

bluez.test.bot@gmail.com May 15, 2023, 11:10 p.m. UTC | #1
This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=747773

---Test result---

Test Summary:
CheckPatch                    FAIL      3.79 seconds
GitLint                       PASS      2.45 seconds
BuildEll                      PASS      26.23 seconds
BluezMake                     PASS      753.81 seconds
MakeCheck                     PASS      12.07 seconds
MakeDistcheck                 PASS      153.12 seconds
CheckValgrind                 PASS      245.43 seconds
CheckSmatch                   PASS      329.01 seconds
bluezmakeextell               PASS      99.56 seconds
IncrementalBuild              PASS      4446.45 seconds
ScanBuild                     PASS      975.65 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[BlueZ,7/7] plugin: Treat -ENOTSUP as -ENOSYS
WARNING:ENOSYS: ENOSYS means 'invalid syscall nr' and nothing else
#101: FILE: src/plugin.c:189:
+			if (err == -ENOSYS || err == -ENOTSUP)

/github/workspace/src/src/13242265.patch total: 0 errors, 1 warnings, 8 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

/github/workspace/src/src/13242265.patch has style problems, please review.

NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.




---
Regards,
Linux Bluetooth
diff mbox series

Patch

diff --git a/src/profile.c b/src/profile.c
index e1bebf1ee19c..ea188f36b6dd 100644
--- a/src/profile.c
+++ b/src/profile.c
@@ -775,6 +775,12 @@  static struct btd_profile *btd_profile_find_uuid(const char *uuid)
 
 int btd_profile_register(struct btd_profile *profile)
 {
+	if (profile->experimental && !(g_dbus_get_flags() &
+					G_DBUS_FLAG_ENABLE_EXPERIMENTAL)) {
+		DBG("D-Bus experimental not enabled");
+		return -ENOTSUP;
+	}
+
 	profiles = g_slist_append(profiles, profile);
 	return 0;
 }
diff --git a/src/profile.h b/src/profile.h
index 6827f848148c..6871f2f0d7d8 100644
--- a/src/profile.h
+++ b/src/profile.h
@@ -28,6 +28,11 @@  struct btd_profile {
 	 */
 	bool external;
 
+	/* Indicates the profile is experimental and shall only be registered
+	 * when experimental has been enabled (see: main.conf:Experimental).
+	 */
+	bool experimental;
+
 	int (*device_probe) (struct btd_service *service);
 	void (*device_remove) (struct btd_service *service);