projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7caeec9
)
xentrace: error handling on non-existent formats file
author
Keir Fraser
<keir.fraser@citrix.com>
Thu, 12 Mar 2009 15:07:20 +0000
(15:07 +0000)
committer
Keir Fraser
<keir.fraser@citrix.com>
Thu, 12 Mar 2009 15:07:20 +0000
(15:07 +0000)
Attached patch does proper error handling when specified
formats file doesn't exist.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
tools/xentrace/xentrace_format
patch
|
blob
|
history
diff --git
a/tools/xentrace/xentrace_format
b/tools/xentrace/xentrace_format
index d66cb74578f9a8fd4aec9d5228158ec7fdc40e18..f0127309abb9fb8650b36243c270450a886b21a2 100644
(file)
--- a/
tools/xentrace/xentrace_format
+++ b/
tools/xentrace/xentrace_format
@@
-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)