[openib-general] Re: [patch] userspace/management/diags/src/sminfo.c -cmdline processing fix

Michael S. Tsirkin mst at mellanox.co.il
Tue Jan 17 02:30:56 PST 2006


Quoting Sasha Khapyorsky <sashak at voltaire.com>:
> Subject: [patch] userspace/management/diags/src/sminfo.c -cmdline processing fix
> 
> Hello Hal,
> 
> There is small bug in sminfo's cmdline processing, this will segfault
> when option argument is missing (like 'sminfo -a'). The "fast and dirty"
> fix is inlined.
> 
> The same problem exists with most diag tools, so I think we need to
> rework AGRBEGIN { ... } ARGEND stuff (actually remove it from
> libibcommon since it is used by diag tools only). I can do it if there
> are no objections.
> 
> Regards,
> Sasha.
> 
> 
> This fast fix for invalid ARGF() usage in sminfo.c.
> 
> Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>

BTW, why arent the diags using the standard getopt_long?
That would solve the problem above in a clean way and help us get rid of
the ARGxxx macros completely.

Hal?

-- 
MST



More information about the general mailing list