summaryrefslogtreecommitdiff
path: root/apps/plugins/lib
diff options
context:
space:
mode:
authorAidan MacDonald <amachronic@protonmail.com>2023-03-14 12:19:48 +0000
committerAidan MacDonald <amachronic@protonmail.com>2023-03-21 16:23:54 -0400
commitd40a598970b04bfe3a867a5e12debc45c149b46b (patch)
tree26e974f910f7d3047adfbc536d8e10c2d973b7e9 /apps/plugins/lib
parent2fb2364686e5470437f0ee3d214662d51067eb90 (diff)
downloadrockbox-d40a598970b04bfe3a867a5e12debc45c149b46b.tar.gz
rockbox-d40a598970b04bfe3a867a5e12debc45c149b46b.zip
plugins: Simplify plugin/codec API versioning
Replace the minimum version bound with a check on the size of the API struct. The version only needs to be incremented for ABI breaking changes. Additions to the API won't need to touch the version number, resulting in fewer merge conflicts. Change-Id: I916a04a7bf5890dcf5d615ce30087643165f8e1f
Diffstat (limited to 'apps/plugins/lib')
-rw-r--r--apps/plugins/lib/overlay.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/apps/plugins/lib/overlay.c b/apps/plugins/lib/overlay.c
index 0ecc1bf3e7..065273534e 100644
--- a/apps/plugins/lib/overlay.c
+++ b/apps/plugins/lib/overlay.c
@@ -83,9 +83,8 @@ enum plugin_status run_overlay(const void* parameter,
83 goto error_close; 83 goto error_close;
84 } 84 }
85 85
86 86 if (hdr->api_version != PLUGIN_API_VERSION ||
87 if (hdr->api_version > PLUGIN_API_VERSION 87 p_hdr->api_size > sizeof(struct plugin_api))
88 || hdr->api_version < PLUGIN_MIN_API_VERSION)
89 { 88 {
90 rb->splashf(2*HZ, "%s overlay: Incompatible version.", name); 89 rb->splashf(2*HZ, "%s overlay: Incompatible version.", name);
91 goto error_close; 90 goto error_close;