Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ECUSoftwareVersionFileField option to dlt.conf #554

Conversation

harisokanovic
Copy link
Contributor

Add ECUSoftwareVersionFileField option to dlt.conf

Modify dlt_daemon_local_ecu_version_init() to read a single field from
KEY=VALUE (or quoted KEY="VALUE") style files, so that dlt-daemon can
report an OS version number parsed from /etc/os-release file.

For example, get_software_version would return "22.04.3 LTS" under the
following configuration:

$ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION="22.04.3 LTS"
VERSION_CODENAME=jammy

$ cat /etc/dlt.conf
PathToECUSoftwareVersion = /etc/os-release
ECUSoftwareVersionFileField = VERSION

Modify dlt_daemon_local_ecu_version_init() to read a single field from
KEY=VALUE (or quoted KEY="VALUE") style files, so that dlt-daemon can
report an OS version number parsed from /etc/os-release file.

For example, get_software_version would return "22.04.3 LTS" under the
following configuration:

$ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION="22.04.3 LTS"
VERSION_CODENAME=jammy

$ cat /etc/dlt.conf
PathToECUSoftwareVersion = /etc/os-release
ECUSoftwareVersionFileField = VERSION

Signed-off-by: Haris Okanovic <[email protected]>
@michael-methner michael-methner merged commit 7a55368 into COVESA:master Nov 14, 2023
3 checks passed
@michael-methner
Copy link
Collaborator

Hello @harisokanovic ,
thanks for the contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants