[ofw] Re: [ib-diag] sminfo: add support for WinOF
sashak at voltaire.com
Sat Feb 14 12:04:08 PST 2009
On 11:26 Sat 14 Feb , Sean Hefty wrote:
> >Isn't cl_nodenamemap.h part of complib?
> It's not available in windows. (Yes, sadly, even the OS abstraction code
> doesn't share a common codebase between the two platforms...) I'm not even sure
> nodenamemap is really at the same level of abstraction as other complib items,
> but I didn't want to try changing that area of the code at this time. (It seems
> like adding a cl_map_insert_copy() type operation would provide the desired
> I guess I can try adding nodenamemap to the windows version of complib for now.
> I didn't because I'm not convinced that it should be in complib.
> >> opts_map is declared as const - (i.e. my compiler whined at me)
> >Probably it is reasonable to just drop const then. I don't see what this
> >const really does.
> If I remember correctly, I tried that and heard a different whine out of the
> compiler. I'll re-examine what the problem was.
Ok, I'm starting to understand (again :)) why 'const' is there:
static const struct ibdiag_opt *opts_map;
memset(opts_map, 0, sizeof(opts_map));
opts_map is array of pointers which should refer read-only areas,
memset() initializes the array itself. As far as I understand there
should not be a "const violations".
More information about the ofw