[openib-general] Re: [PATCH] Allow setting of NodeDescription

Michael S. Tsirkin mst at mellanox.co.il
Thu Sep 15 07:21:41 PDT 2005


Quoting r. Hal Rosenstock <halr at voltaire.com>:
> Subject: Re: [openib-general] Re: [PATCH] Allow setting of NodeDescription
> 
> On Thu, 2005-09-15 at 06:58, Michael S. Tsirkin wrote:
> > Quoting Hal Rosenstock <halr at voltaire.com>:
> > > Subject: Re: [openib-general] Re: [PATCH] Allow setting of
> NodeDescription
> > > 
> > > On Thu, 2005-09-15 at 03:36, Michael S. Tsirkin wrote:
> > > > Would make more sense to initialize node_desc to an empty string
> > > > instead of whatever is programmed in the device flash?
> > > > This creates a way for the remote user to find out that the "echo"
> > > > script above did not run yet, and try again later.
>
> [ skip .... ]
>
> This approach could result in nodes not having a 0 byte null terminated
> NodeDescription.

I am proposing filling NodeDescription with 0's (thats "", or empty
string). Clearly this produces a 0 byte terminated NodeDescription.
What am I missing?

BTW, it seems obvious that tools should use something like
printf("%.64s", NodeDescription) to print it, allowing nodes to use
all 64 bytes of the description, rather than assume that the name
is at most 63 bit wide.

-- 
MST



More information about the general mailing list