WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 8/11] Don't abort on untranslatable errors: EINVAL an

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 8/11] Don't abort on untranslatable errors: EINVAL and print warning.
From: Rusty Russell <rusty@xxxxxxxxxxxxxxx>
Date: Thu, 04 Aug 2005 22:31:48 +1000
Delivery-date: Thu, 04 Aug 2005 12:32:08 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Rusty Russell <rusty@xxxxxxxxxxxxxxx>
# Node ID 24d23956f7da1dfe80773ced552041cf953c090a
# Parent  3550a20343ba6762cfca9e43d38866b036363e32
Don't abort on untranslatable errors: EINVAL and print warning.
(Test was useful in development, bad for deployment).

Signed-off-by: Rusty Russell <rusty@xxxxxxxxxxxxxxx>

diff -r 3550a20343ba -r 24d23956f7da tools/xenstore/xenstored_core.c
--- a/tools/xenstore/xenstored_core.c   Thu Aug  4 11:41:51 2005
+++ b/tools/xenstore/xenstored_core.c   Thu Aug  4 11:42:40 2005
@@ -504,11 +504,13 @@
 {
        unsigned int i;
 
-       for (i = 0; error != xsd_errors[i].errnum; i++)
-               if (i == ARRAY_SIZE(xsd_errors) - 1)
-                       corrupt(conn, "Unknown error %i (%s)", error,
-                               strerror(error));
-
+       for (i = 0; error != xsd_errors[i].errnum; i++) {
+               if (i == ARRAY_SIZE(xsd_errors) - 1) {
+                       eprintf("xenstored: error %i untranslatable", error);
+                       i = 0;  /* EINVAL */
+                       break;
+               }
+       }
        send_reply(conn, XS_ERROR, xsd_errors[i].errstring,
                          strlen(xsd_errors[i].errstring) + 1);
 }


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH 8/11] Don't abort on untranslatable errors: EINVAL and print warning., Rusty Russell <=