plugin: Treat -ENOTSUP as -ENOSYS
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Mon, 15 May 2023 21:02:33 +0000 (14:02 -0700)
committerAyush Garg <ayush.garg@samsung.com>
Fri, 5 Jan 2024 10:41:35 +0000 (16:11 +0530)
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

index dd7b406..80990f8 100755 (executable)
@@ -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