From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:49651) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SSX3j-0001sp-Cj for qemu-devel@nongnu.org; Thu, 10 May 2012 13:21:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SSX3g-0000Ir-2P for qemu-devel@nongnu.org; Thu, 10 May 2012 13:21:46 -0400 Received: from mail-ob0-f173.google.com ([209.85.214.173]:49294) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SSX3f-0000IE-Rt for qemu-devel@nongnu.org; Thu, 10 May 2012 13:21:44 -0400 Received: by obbwd20 with SMTP id wd20so2422295obb.4 for ; Thu, 10 May 2012 10:21:42 -0700 (PDT) Sender: fluxion Date: Thu, 10 May 2012 12:21:37 -0500 From: Michael Roth Message-ID: <20120510172137.GD17353@illuin> References: <20120510162606.15504.39510.stgit@t> <20120510162807.15504.42279.stgit@t> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120510162807.15504.42279.stgit@t> Subject: Re: [Qemu-devel] [PATCH v12 1/4] qerror: add five qerror strings List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amos Kong Cc: qemu-devel@nongnu.org, owasserm@redhat.com, aliguori@us.ibm.com, jasowang@redhat.com, quintela@redhat.com On Fri, May 11, 2012 at 12:28:08AM +0800, Amos Kong wrote: > Add five new qerror strings, they are about listen/connect socket: > QERR_SOCKET_CONNECT_IN_PROGRESS > QERR_SOCKET_CONNECT_FAILED > QERR_SOCKET_LISTEN_FAILED > QERR_SOCKET_BIND_FAILED > QERR_SOCKET_CREATE_FAILED > > Signed-off-by: Amos Kong > Reviewed-by: Orit Wasserman Reviewed-by: Michael Roth > --- > qerror.c | 20 ++++++++++++++++++++ > qerror.h | 15 +++++++++++++++ > 2 files changed, 35 insertions(+), 0 deletions(-) > > diff --git a/qerror.c b/qerror.c > index 96fbe71..5092fe7 100644 > --- a/qerror.c > +++ b/qerror.c > @@ -304,6 +304,26 @@ static const QErrorStringTable qerror_table[] = { > .error_fmt = QERR_VNC_SERVER_FAILED, > .desc = "Could not start VNC server on %(target)", > }, > + { > + .error_fmt = QERR_SOCKET_CONNECT_IN_PROGRESS, > + .desc = "Connection can not be completed immediately", > + }, > + { > + .error_fmt = QERR_SOCKET_CONNECT_FAILED, > + .desc = "Failed to connect to socket", > + }, > + { > + .error_fmt = QERR_SOCKET_LISTEN_FAILED, > + .desc = "Failed to set socket to listening mode", > + }, > + { > + .error_fmt = QERR_SOCKET_BIND_FAILED, > + .desc = "Failed to bind socket", > + }, > + { > + .error_fmt = QERR_SOCKET_CREATE_FAILED, > + .desc = "Failed to create socket", > + }, > {} > }; > > diff --git a/qerror.h b/qerror.h > index 5c23c1f..4cbba48 100644 > --- a/qerror.h > +++ b/qerror.h > @@ -248,4 +248,19 @@ QError *qobject_to_qerror(const QObject *obj); > #define QERR_VNC_SERVER_FAILED \ > "{ 'class': 'VNCServerFailed', 'data': { 'target': %s } }" > > +#define QERR_SOCKET_CONNECT_IN_PROGRESS \ > + "{ 'class': 'SockConnectInprogress', 'data': {} }" > + > +#define QERR_SOCKET_CONNECT_FAILED \ > + "{ 'class': 'SockConnectFailed', 'data': {} }" > + > +#define QERR_SOCKET_LISTEN_FAILED \ > + "{ 'class': 'SockListenFailed', 'data': {} }" > + > +#define QERR_SOCKET_BIND_FAILED \ > + "{ 'class': 'SockBindFailed', 'data': {} }" > + > +#define QERR_SOCKET_CREATE_FAILED \ > + "{ 'class': 'SockCreateFailed', 'data': {} }" > + > #endif /* QERROR_H */ >