diff mbox series

[BlueZ,7/7] plugin: Treat -ENOTSUP as -ENOSYS

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

Commit Message

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

If plugin .init returns -ENOTSUP treat it as the system doesn't
support the driver since that is the error returned by
btd_profile_register when experimental is disabled.
---
 src/plugin.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/src/plugin.c b/src/plugin.c
index dd7b406c857b..80990f8c3c7e 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -186,7 +186,7 @@  start:
 
 		err = plugin->desc->init();
 		if (err < 0) {
-			if (err == -ENOSYS)
+			if (err == -ENOSYS || err == -ENOTSUP)
 				warn("System does not support %s plugin",
 							plugin->desc->name);
 			else