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/
Home Products Support Community News


[Xen-changelog] [xen-unstable] xentrace: error handling on non-existent

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xentrace: error handling on non-existent formats file
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 12 Mar 2009 08:10:12 -0700
Delivery-date: Thu, 12 Mar 2009 08:10:32 -0700
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1236870440 0
# Node ID 3e98bc2b6911572d240708917d41298c7a66e849
# Parent  a55a98b36a2a5e12c05bd9c6653725f4e8cbe50a
xentrace: error handling on non-existent formats file

Attached patch does proper error handling when specified
formats file doesn't exist.

Signed-off-by: Christoph Egger <Christoph.Egger@xxxxxxx>
 tools/xentrace/xentrace_format |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletion(-)

diff -r a55a98b36a2a -r 3e98bc2b6911 tools/xentrace/xentrace_format
--- a/tools/xentrace/xentrace_format    Thu Mar 12 11:33:35 2009 +0000
+++ b/tools/xentrace/xentrace_format    Thu Mar 12 15:07:20 2009 +0000
@@ -81,7 +81,11 @@ signal.signal(signal.SIGINT,  sighand)
 interrupted = 0
-defs = read_defs(arg[0])
+    defs = read_defs(arg[0])
+except IOError, exn:
+    print exn
+    sys.exit(1)
 # structure of trace record (as output by xentrace):
 # HDR(I) {TSC(Q)} D1(I) D2(I) D3(I) D4(I) D5(I) D6(I) D7(I)

Xen-changelog mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xentrace: error handling on non-existent formats file, Xen patchbot-unstable <=