[openib-general] [PATCH] opensm: remove obsolete p_report_buf

Sasha Khapyorsky sashak at voltaire.com
Mon Oct 23 08:49:42 PDT 2006


On 15:51 Mon 23 Oct     , Yevgeny Kliteynik wrote:
> 
> Sasha Khapyorsky wrote:
> > On 09:02 Mon 23 Oct     , Yevgeny Kliteynik wrote:
> >> Hi Sasha.
> >>
> >> The removal of the sm->p_report_buf is a good idea. 
> >> However, I do have one comment:
> >> In several cases this buffer was printed using the osm_log_raw() 
> >> function, and you replaced this with a plain fprintf(stdout,...).
> >> Right now the osm_log_raw function just prints to stdout too, but 
> >> this doesn't always have to be the case. Besides, osm_log_raw 
> >> provides verbosity level checking, which is lost when you replace 
> >> it with printf.
> > 
> > Both functions calls were and still be conditonalized by verbosity
> > level, so it is not lost.
> 
> Right, there is a check in the beginning of the function, mea culpa.
> Anyway, this wasn't the main point. I grep'ed the osm code, and the 
> only cases where there is an explicit printing to stdout is when log 
> is not initialized yet, or in console mode, and I think that this is 
> a better way to manage logging (even though printing directly to stdout
> is more efficient).

I'm not following. Those functions _are_ printing to stdout. If in a
future we will want other file we will replace 'stdout' by other stream
(and this is why fprintf() and not printf() is used in the patch).

Sasha




More information about the general mailing list