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] add the line number to the config file parsing error

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] add the line number to the config file parsing error message
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Thu, 14 Jan 2010 15:48:50 +0000
Delivery-date: Thu, 14 Jan 2010 07:47:45 -0800
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)
Hi all,
this patch adds the line number to the config file parsing error
message.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>

---

diff -r 4e75c5d31f9c tools/libxl/xl.c
--- a/tools/libxl/xl.c  Thu Jan 14 15:40:36 2010 +0000
+++ b/tools/libxl/xl.c  Thu Jan 14 15:47:25 2010 +0000
@@ -407,7 +407,7 @@
         newfilename = compat_config_file(filename);
         config_init (&config);
         if (!config_read_file(&config, newfilename)) {
-            fprintf(stderr, "Failed to parse config file %s, try removing any 
embedded python code\n", config_error_text(&config));
+            fprintf(stderr, "Failed to parse config file %s on line %d, try 
removing any embedded python code\n", config_error_text(&config), 
config_error_line(&config));
             exit(1);
         }
         free(newfilename);

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] add the line number to the config file parsing error message, Stefano Stabellini <=