ia64/xen-unstable

changeset 5990:f9a8f24dac67

Don't abort on untranslatable errors: EINVAL and print warning
Signed-off-by: Rusty Russel <rusty@rustcorp.com.au>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author cl349@firebug.cl.cam.ac.uk
date Tue Aug 02 17:59:20 2005 +0000 (2005-08-02)
parents 361d31028129
children a2f9f958fb14
files tools/xenstore/xenstored_core.c
line diff
     1.1 --- a/tools/xenstore/xenstored_core.c	Tue Aug 02 17:13:11 2005 +0000
     1.2 +++ b/tools/xenstore/xenstored_core.c	Tue Aug 02 17:59:20 2005 +0000
     1.3 @@ -504,11 +504,13 @@ void send_error(struct connection *conn,
     1.4  {
     1.5  	unsigned int i;
     1.6  
     1.7 -	for (i = 0; error != xsd_errors[i].errnum; i++)
     1.8 -		if (i == ARRAY_SIZE(xsd_errors) - 1)
     1.9 -			corrupt(conn, "Unknown error %i (%s)", error,
    1.10 -				strerror(error));
    1.11 -
    1.12 +	for (i = 0; error != xsd_errors[i].errnum; i++) {
    1.13 +		if (i == ARRAY_SIZE(xsd_errors) - 1) {
    1.14 +			eprintf("xenstored: error %i untranslatable", error);
    1.15 +			i = 0; 	/* EINVAL */
    1.16 +			break;
    1.17 +		}
    1.18 +	}
    1.19  	send_reply(conn, XS_ERROR, xsd_errors[i].errstring,
    1.20  			  strlen(xsd_errors[i].errstring) + 1);
    1.21  }