Add plugin version to VFS OSS plugins

To differentiate between the legacy and the current VFS OSS plugin both
plugins will feature a 'plugin_version' field in its info file. This
is used for enabling features provide by the current version that are
not supported in the legacy one.

Issue #5167.
This commit is contained in:
Josef Söntgen 2024-04-04 13:32:26 +02:00 committed by Christian Helmuth
parent 4a9e6a001f
commit 33735d0af8
2 changed files with 6 additions and 0 deletions

View File

@ -51,6 +51,7 @@ struct Vfs::Oss_file_system::Audio
struct Info
{
unsigned plugin_version;
unsigned channels;
unsigned format;
unsigned sample_rate;
@ -96,6 +97,7 @@ struct Vfs::Oss_file_system::Audio
Readonly_value_file_system<unsigned> &optr_fifo_samples_fs,
Value_file_system<unsigned> &play_underruns_fs)
:
plugin_version { 2 },
channels { 0 },
format { 0 },
sample_rate { 0 },
@ -149,6 +151,7 @@ struct Vfs::Oss_file_system::Audio
char buf[512] { };
Genode::Xml_generator xml(buf, sizeof(buf), "oss", [&] () {
xml.attribute("plugin_version", plugin_version);
xml.attribute("channels", channels);
xml.attribute("format", format);
xml.attribute("sample_rate", sample_rate);

View File

@ -70,6 +70,7 @@ struct Vfs::Oss_file_system::Audio
struct Info
{
unsigned plugin_version;
unsigned channels;
unsigned format;
unsigned sample_rate;
@ -115,6 +116,7 @@ struct Vfs::Oss_file_system::Audio
Readonly_value_file_system<unsigned> &optr_fifo_samples_fs,
Value_file_system<unsigned> &play_underruns_fs)
:
plugin_version { 1 },
channels { 0 },
format { 0 },
sample_rate { 0 },
@ -168,6 +170,7 @@ struct Vfs::Oss_file_system::Audio
char buf[512] { };
Genode::Xml_generator xml(buf, sizeof(buf), "oss", [&] () {
xml.attribute("plugin_version", plugin_version);
xml.attribute("channels", channels);
xml.attribute("format", format);
xml.attribute("sample_rate", sample_rate);