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

Hal Rosenstock halr at voltaire.com
Tue Jan 17 03:59:37 PST 2006


Hi Michael,
 
I believe this is largely historical. I will put this on the list TODO for the diags and hopefully get to it in the not too distant future.
 
-- Hal

________________________________

From: Michael S. Tsirkin [mailto:mst at mellanox.co.il]
Sent: Tue 1/17/2006 5:30 AM
To: Sasha Khapyorsky
Cc: Hal Rosenstock; openib
Subject: Re: [patch] userspace/management/diags/src/sminfo.c -cmdline processing fix



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