LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: ipvsadm return code patch

To: <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: ipvsadm return code patch
From: Wensong Zhang <wensong@xxxxxxxxxxxx>
Date: Sat, 10 Nov 2001 15:38:13 +0800 (CST)
On Fri, 9 Nov 2001, John Cronin wrote:

> Pedraig wrote:
> > Wensong Zhang wrote:
> >
> > > On Wed, 7 Nov 2001, Padraig Brady wrote:
> > >
> > >>This 1 line patch is useful for me and I don't think it
> > >>will break anything. It's against 0.8.2 and basically
> > >>returns a specific error code from ipvsadm.
> > >
> > > ipvsadm has already printed error message of errno, I don't see why return
> > > error instead of -1, when error happens.
> >
> > Printing the error code is only good for humans.
> > If you want to programattically control ipvsadm
> > you need the error code returned.
>
> I have to agree.  I am a fan of meaningful error codes, and if the one
> line patch doesn't break anything, I am in favor of it.  It beats trying
> to parse text output with perl or grep trying to figure out what happened.
>
>

This errno is only meaningful for IPVS code, because IPVS kernel code
define/ decides to return which error code when error occurs. For ipvsadm,
I think it is enough to return -1 on error.

Regards,

Wensong



<Prev in Thread] Current Thread [Next in Thread>