[ofw] [Bug 1886] New: rc of ibping
Leonid Keller
leonid at mellanox.co.il
Tue Jan 5 02:27:17 PST 2010
> What is wrong with negative exit status?
I'm not a Linux man. :(
I was told that the convention is to have positive error codes in user
space and negative in kernel one.
Sasha,
I was told, that you are generally in charge of these applications.
As far as we ported them to Windows (in hope that they will behave the
same way like in Linux),
I'd suggest that you or someone will fix this issue for ibping and other
ibdiag (and other) utilities and share the patch with Windows OFED
community.
Of course, it can be done the other way around.
What do you think ?
> -----Original Message-----
> From: Sasha Khapyorsky [mailto:sashakvolt at gmail.com] On
> Behalf Of Sasha Khapyorsky
> Sent: Tuesday, January 05, 2010 12:14 PM
> To: Leonid Keller
> Cc: Sean Hefty; ofw_list; Yevgeny Kliteynik; Regev Lev
> Subject: Re: [Bug 1886] New: rc of ibping
>
> On 11:13 Tue 05 Jan , Leonid Keller wrote:
> >
> > The bug, shown below, has its origin in Linux sources.
> > I didn't check all the applications of ib_diag package, but
> at least
> > ibping returns sometimes inconventional return codes.
> > For example, -1 on error instead of a positive value.
>
> What is wrong with negative exit status?
>
> > Or 2 upon 'ibping -V'.
> > Why is it error at all ?
>
> Seems that historically -V (--version) was implemented
> similar to --help in sense of return code. I don't really see
> a reason why, this can be changed IMO.
>
> > And why 2 ? It's ENOENT. Should be EINVAL (22) if it is regarded as
> > error.
>
> Program exit status is not the same thing as 'errno'
> variable, so at least formally it shouldn't follow E* convention.
>
> Sasha
>
More information about the ofw
mailing list