diff options
author | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2006-03-06 12:05:44 +0100 |
---|---|---|
committer | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2006-03-06 12:05:44 +0100 |
commit | d531f7eb392bc72a02d54c78fbd240542e423e44 (patch) | |
tree | 20d688e8a0d83fb521377a8e77f27b5cfd6f0dd5 /tools/libxc/xc_core.c | |
parent | e827985a3c62b7be91c954f0b30b6175eb5bbcaa (diff) | |
download | xen-d531f7eb392bc72a02d54c78fbd240542e423e44.tar.gz xen-d531f7eb392bc72a02d54c78fbd240542e423e44.tar.bz2 xen-d531f7eb392bc72a02d54c78fbd240542e423e44.zip |
libxc: xc_ptrace cleanups
General Cleanups
* Use { after if consistently in xc_ptrace.c and xc_ptrace_core.c
(But not in xc_ptrace_core() which should be removed shortly)
* Remove duplicate code and centralise around xc_ptrace.h
* Avoid ifing values covered by case in xc_ptrace()
- PTRACE_GETREGS, PTRACE_GETFPREGS and PTRACE_GETFPXREGS are grouped into
a single case, and then with the exception of a call to FETCH_REGS(),
different code is executed based on ifing the values covered by the
case. The PTRACE_GETFPREGS and PTRACE_GETFPXREGS code is actually a
duplicate. This patch breaks the code out to two different cases.
Error Handling
* Eliminate FETCH_REGS macro as it forces several functions
to have an otherwise uneeded error_out label, mittigating
any code savins.
* Rework error handling in xc_ptrace().
- Remove FETCH_REGS as above
- Make sure that all dom0 errors are caught
- Make sure errno is always set on error
* Eliminate gotos in xc_ptrace_core.c that do nothing but return
Signed-Off-By: Horms <horms@verge.net.au>
Diffstat (limited to 'tools/libxc/xc_core.c')
0 files changed, 0 insertions, 0 deletions