cvs commit: src/sys/boot/i386/libi386 Makefile libi386.h smbios.c src/sys/boot/i386/loader main.c

Jung-uk Kim jkim at FreeBSD.org
Tue Jul 26 18:39:26 GMT 2005


On Tuesday 26 July 2005 01:02 pm, Peter Wemm wrote:
> On Tuesday 26 July 2005 04:04 am, Dag-Erling Smørgrav wrote:
> > Jung-uk Kim <jkim at FreeBSD.org> writes:
> > >   Log:
> > >   Scan static SMBIOS structures and export the following
> > > environment variables to loader: [...]
> >
> > These values are sometimes padded, IWBNI libi386 could remove
> > that padding:
> >
> > hint.smbios.0.system.maker="Dell Inc.                "
> > hint.smbios.0.system.product="Dimension XPS Gen 3          "
> >
> > also, there's a typo in one of the strings:
> >
> > Hint.smbios.0.planar.version="   "
> >
> > (note the capital H)

I think we should keep the spaces.  SMBIOS spec. says anything before 
NULL is valid if my memory serves.

> It's not a typo.  Its got the wrong number of fields so the hint
> scanner disables it.
>                 if (strncmp(cp, "hint.", 5) != 0)
>                         hit = 0;
>                 else
>                         n = sscanf(cp,
> "hint.%32[^.].%d.%32[^=]=%128s", r_name, &r_unit, r_resname,
> r_value); if (hit && n != 4) {
>                         printf("CONFIG: invalid hint '%s'\n", cp);
>                         p = index(cp, 'h');
>                         *p = 'H';
>                         hit = 0;
>                 }
>
> hint.smbios.0.planar.version is an illegal hint.  It has 5 fields,
> not 4.  These are not free-form strings.

Ouch...  Is this okay for you?

Thanks,

Jung-uk Kim
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smbios.diff
Type: text/x-diff
Size: 1945 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/cvs-src/attachments/20050726/d0e1cb5a/smbios.bin


More information about the cvs-src mailing list