diff options
author | Nico Huber <nico.h@gmx.de> | 2024-03-16 01:00:46 +0100 |
---|---|---|
committer | Martin L Roth <gaumless@gmail.com> | 2024-03-17 20:08:44 +0000 |
commit | 0db9c2c827ceade8627887a723022c390f2d800b (patch) | |
tree | bc5064aadb0d9200d490c61a009c3c3d40df9efe /src/mainboard/pcengines/apu1/acpi/buttons.asl | |
parent | 0a280ff747b44d7a2a62206ea0c25dbcbc5ce20b (diff) | |
download | coreboot-24.02_branch.tar.gz coreboot-24.02_branch.tar.bz2 coreboot-24.02_branch.zip |
genbuild_h: Fix and harden major/minor version parsing24.02_branch
Our major version is suddenly two digits long to represent the year.
This can't be parsed with the current sed scripts. To make sure that
no unparsed data ends up in our major/minor versions, we'll run sed
with `-n' and only print the extracted numbers if anything. Also, to
allow us to use the version numbers in C code, we strip leading zeros
(a leading 0 identifies octal numbers, so for instance 08 for August
is not a valid number).
This can result in empty major/minor version strings, so we move the
default `0' to the final variable expansion.
As a bonus, this makes an explicit check if the numbers can be parsed
unnecessary.
Change-Id: Ie39381a8ef4b971556168b6996efeefe6adf2b14
Reported-by: Christoph Zechner <christophz@vrvis.at>
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81291
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/pcengines/apu1/acpi/buttons.asl')
0 files changed, 0 insertions, 0 deletions