Commit Graph
13 Commits
Author SHA1 Message Date
Keir Fraser 5cc436c1d2 libxc: eliminate static variables, use xentoollog; API change
This patch eliminate the global variables in libxenctrl (used for
logging and error reporting).

Instead the information which was in the global variables is now in a
new xc_interface* opaque structure, which xc_interface open returns
instead of the raw file descriptor; furthermore, logging is done via
xentoollog.

There are three new parameters to xc_interface_open to control the
logging, but existing callers can just pass "0" for all three to get
the old behaviour.

All libxc callers have been adjusted accordingly.

Also update QEMU_TAG for corresponding qemu change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-05-28 09:30:19 +01:00
Keir Fraser 36cfb6aa84 libelf: Tidy up logging and remove dependency on stdio.
libelf now permits callers to specify logging callback functions,
rather than a FILE*.  libelf's non-Xen callers are all libxc users, so
the stdio dependency and the default logging callback function (which
calls vfprintf) is now in libxc.

Xen's use of libxc is unaffected in this patch.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
2010-05-28 09:27:40 +01:00
Keir Fraser 8ce65842ad Move libelf headers out of xen public header dir.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
2009-01-08 13:15:49 +00:00
kfraser@localhost.localdomain 7954a48c41 Add suspend_cancel flag to linux elf notes.
Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
2007-02-28 09:41:02 +00:00
Ian Campbell 0a650f1a63 [TOOLS] Add support for XEN_ELFNOTE_L1_MFN_VALID to readnotes.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-02-27 15:39:08 +00:00
Ian Campbell 6f1113b5c5 [LIBELF] Prefer PT_NOTE segments to SHT_NOTE sections for ELF notes.
It's always an error to try to use sections on an executable; the
segments in the phdr are definitive.

Unfortunately we cannot drop SHT_NOTE support completely due to a
binutils bug which causes kernels to have the offset field of the
PT_NOTE phdr set to zero:

	http://sourceware.org/bugzilla/show_bug.cgi?id=594

This bug is present in binutils 2.17 although some distros have
backported the fix.

Therefore we simply prefer a PT_NOTE segment if we find one otherwise
we still use the SHT_NOTE section (and then the old __xen_guest
section).

Based on a patch from Jeremy Fitzhardinge.

Also added XEN_ELFNOTE_HV_START_LOW to readnotes.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-02-19 12:21:41 +00:00
Emmanuel Ackaouy e42527954e [TOOLS] Fix typos which breaks readnotes transparent gunzipping ...
From: Gerd Hoffmann <kraxel@suse.de>
Signed-off-by: Emmanuel Ackaouy <ack@xensource.com>
2007-01-31 15:23:51 +00:00
Emmanuel Ackaouy 62e3530a35 Support transparant gunzipping in the readnotes utility.
Signed-off-by: Gerd Hoffmann <kraxel@suse.de>
---
 tools/xcutils/readnotes.c |   14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
2007-01-25 22:16:52 +00:00
Emmanuel Ackaouy 0d2b8607e3 libelf: use for readnotes utility.
This patch makes the readnotes utility use libelf.

Signed-off-by: Gerd Hoffmann <kraxel@suse.de>
---
 tools/xcutils/readnotes.c |  277 +++++++---------------------------------------
 1 file changed, 45 insertions(+), 232 deletions(-)
2007-01-25 22:16:52 +00:00
kfraser@localhost.localdomain 9e20e8426f [TOOLS] Avoid void* arithmetic when parsing elf notes.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-01-19 15:05:20 +00:00
kfraser@localhost.localdomain 2d0b60a90f [SOLARIS] A couple of simple compile fixes for tools/ on Solaris.
Signed-off-by: John Levon <john.levon@sun.com>
2006-10-17 18:15:59 +01:00
Ian Campbell e76cb15dce [TOOLS] Use ELFSIZE to pick the ELF structures to use in readnotes.c
We can remove Elf_Ehdr since it is only used for e_ident which is an
unsigned char array.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-08-25 10:39:24 +01:00
Ian Campbell dfeb46aa49 [TOOLS] Add a simple tool to display the Xen specific ELF notes.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-08-23 14:43:48 +01:00