On Sep 10, 2009, at 12:32 PM, Tom Pothier wrote:

Hi Mike,

Thank you, comments below.

On 09/05/09 20:59, Mike Shapiro wrote:

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.


Added. Should this also be added to smbios_info_common() at line 207?

Sorry for delay in replying: I've been out past week and a half.
No, it doesn't belong there because the code is written to return
a set of empty strings for types that have no common info.



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.


Are you referencing the Type-3 elements min/max here?

Yes.


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.


So I think what you want is in the case of Type-2 "Contained Object Handles", return an array of these handles; in the case of Type-4 contained elements return an array of just the "Contained Element Type"(s) - not the entire element.

If this is the case, I'll start making the changes and expect them in the next webrev.

thx,
-t

Yes.  Send back an updated webrev when you have it and I'll
try to respin very quickly for you.  Appreciate your patience.

-Mike

---
Mike Shapiro, Sun Microsystems Open Storage / Fishworks. blogs.sun.com/ mws/

_______________________________________________
fm-discuss mailing list
fm-discuss@opensolaris.org

Reply via email to