Message ID | 1440520182-21309-1-git-send-email-colin.king@canonical.com |
---|---|
State | Accepted |
Headers | show |
On 08/26/2015 12:29 AM, Colin King wrote: > From: Colin Ian King <colin.king@canonical.com> > > The coreboot folk have noted that the OEM ID test is too strict > and perhaps isprint() should be used instead to check for bad OEM ID > strings as this makes more sense and allows spaces and other printable > characters. > > Reported-by: Patrick Georgi <patrick@georgi-clan.de> > Signed-off-by: Colin Ian King <colin.king@canonical.com> > --- > src/acpi/rsdp/rsdp.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/src/acpi/rsdp/rsdp.c b/src/acpi/rsdp/rsdp.c > index 2fe530b..ce5137f 100644 > --- a/src/acpi/rsdp/rsdp.c > +++ b/src/acpi/rsdp/rsdp.c > @@ -52,16 +52,16 @@ static int rsdp_test1(fwts_framework *fw) > size_t i; > > for (i = 0; i < 6; i++) { > - if (!isalnum(rsdp->oem_id[i])) { > + if (!isprint(rsdp->oem_id[i])) { > passed = false; > break; > } > } > if (!passed) { > - fwts_failed(fw, LOG_LEVEL_MEDIUM, > + fwts_failed(fw, LOG_LEVEL_LOW, > "RSDPBadOEMId", > - "RSDP: oem_id does not contain any alpha " > - "numeric characters."); > + "RSDP: oem_id contains non-printable " > + "characters."); > fwts_advice(fw, > "The RSDP OEM Id is non-conforming, but this " > "will not affect the system behaviour. However " > Acked-by: Alex Hung <alex.hung@canonical.com>
On 2015年08月26日 00:29, Colin King wrote: > From: Colin Ian King <colin.king@canonical.com> > > The coreboot folk have noted that the OEM ID test is too strict > and perhaps isprint() should be used instead to check for bad OEM ID > strings as this makes more sense and allows spaces and other printable > characters. > > Reported-by: Patrick Georgi <patrick@georgi-clan.de> > Signed-off-by: Colin Ian King <colin.king@canonical.com> > --- > src/acpi/rsdp/rsdp.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/src/acpi/rsdp/rsdp.c b/src/acpi/rsdp/rsdp.c > index 2fe530b..ce5137f 100644 > --- a/src/acpi/rsdp/rsdp.c > +++ b/src/acpi/rsdp/rsdp.c > @@ -52,16 +52,16 @@ static int rsdp_test1(fwts_framework *fw) > size_t i; > > for (i = 0; i < 6; i++) { > - if (!isalnum(rsdp->oem_id[i])) { > + if (!isprint(rsdp->oem_id[i])) { > passed = false; > break; > } > } > if (!passed) { > - fwts_failed(fw, LOG_LEVEL_MEDIUM, > + fwts_failed(fw, LOG_LEVEL_LOW, > "RSDPBadOEMId", > - "RSDP: oem_id does not contain any alpha " > - "numeric characters."); > + "RSDP: oem_id contains non-printable " > + "characters."); > fwts_advice(fw, > "The RSDP OEM Id is non-conforming, but this " > "will not affect the system behaviour. However " Acked-by: Ivan Hu <ivan.hu@canonical.com>
diff --git a/src/acpi/rsdp/rsdp.c b/src/acpi/rsdp/rsdp.c index 2fe530b..ce5137f 100644 --- a/src/acpi/rsdp/rsdp.c +++ b/src/acpi/rsdp/rsdp.c @@ -52,16 +52,16 @@ static int rsdp_test1(fwts_framework *fw) size_t i; for (i = 0; i < 6; i++) { - if (!isalnum(rsdp->oem_id[i])) { + if (!isprint(rsdp->oem_id[i])) { passed = false; break; } } if (!passed) { - fwts_failed(fw, LOG_LEVEL_MEDIUM, + fwts_failed(fw, LOG_LEVEL_LOW, "RSDPBadOEMId", - "RSDP: oem_id does not contain any alpha " - "numeric characters."); + "RSDP: oem_id contains non-printable " + "characters."); fwts_advice(fw, "The RSDP OEM Id is non-conforming, but this " "will not affect the system behaviour. However "