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-changelog

[Xen-changelog] Don't abort on untranslatable errors: EINVAL and print w

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Don't abort on untranslatable errors: EINVAL and print warning
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 02 Aug 2005 14:04:11 -0400
Delivery-date: Tue, 02 Aug 2005 18:04:37 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User cl349@xxxxxxxxxxxxxxxxxxxx
# Node ID f9a8f24dac6784d097ad3fb0963e55947b1a219f
# Parent  361d31028129af702f0716b83e36c7457cce3039
Don't abort on untranslatable errors: EINVAL and print warning
Signed-off-by: Rusty Russel <rusty@xxxxxxxxxxxxxxx>
Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>

diff -r 361d31028129 -r f9a8f24dac67 tools/xenstore/xenstored_core.c
--- a/tools/xenstore/xenstored_core.c   Tue Aug  2 17:13:11 2005
+++ b/tools/xenstore/xenstored_core.c   Tue Aug  2 17:59:20 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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Don't abort on untranslatable errors: EINVAL and print warning, Xen patchbot -unstable <=