On Wed, Sep 02, 2009 at 12:25:36PM -0400, Tom Pothier wrote: > The webrev is now also available on opensolaris.org: > > http://cr.opensolaris.org/~pothier/onnv-x86gentopo-pb/ > > thx, > -t
I reviewed just the SMBIOS part. Here are the changes I'd like to see: usr/src/common/smbios/smb_info.c Line 275 needs to have this code: if (isp->is_type == SMB_TYPE_EOT) return (smb_set_errno(shp, ESMB_TYPE)); otherwise you return bogus data. usr/src/common/smbios/smb_info.c The interface to smb_info_contains() is not what I want. I don't want to expose bcopy'ing out the implementation gunk with min/max. I just want it to return an array of contained id_t's of other records. The interface should be this: int smbios_info_contains(smbios_hdl_t *shp, id_t id, uint_t idc, id_t *idv); The caller passes an array of uninitialized id_t's 'idv', length 'idc' The function decodes everything about record 'id', copies out the internal record handles from whatever their encoding is (uint8/16) to a set of id_t's with a for loop (not bcopy, since the size varies). The function returns the actual count of contained things. If 'idc' is smaller than that count, then idv only contains 'idc' elements. i.e. you do not copy past the end of the caller's buffer. The smb_infospecs table should contain fields to indicate (a) offset of member with count of elements, (b) offset of member with contained elements, (c) something to indicate format of those contained records. For (c) either introduce flags or have a function pointer to handle the different cases. The rest of smbios stuff looks good: thanks for working on this. Please be sure to get a lot of help testing-- this wad is really important but has a rather huge test matrix. -Mike -- Mike Shapiro, Sun Microsystems Open Storage / Fishworks. blogs.sun.com/mws/ _______________________________________________ fm-discuss mailing list fm-discuss@opensolaris.org