xentrace: error handling
PATCH 1/1 xentrace: error handling
Hi,
Attached patch does proper error handling when specified formats file doesn't exist.
Signed-off-by Christoph Egger <[email protected]>
Signature · 6 lines
---to satisfy European Law for business letters: Advanced Micro Devices GmbH Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Jochen Polster, Thomas M. McCoy, Giuliano Meroni Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632
tools/xentrace/xentrace_format +5 -1
@@ -81,7 +81,11 @@ signal.signal(signal.SIGINT, sighand) interrupted = 0 -defs = read_defs(arg[0]) +try: + 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-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel