Libvirt provides a portable, long term stable C API for managing the virtualization technologies provided by many operating systems. It includes support for QEMU, KVM, Xen, LXC, bhyve, Virtuozzo, VMware vCenter and ESX, VMware Desktop, Hyper-V, VirtualBox and the POWER Hypervisor.
Go to file
Jim Meyering a178a4e7bf Move safewrite and saferead to a separate file.
We currently use safewrite from inside libvirt and don't want to publish
any such function name.  However, we do want to use it in applications
like virsh, libvirtd and libvirt_proxy that link with libvirt.  To that
end, this change moves that function definition (along with the nearly
identical saferead) into a new file, util-lib.c.  To avoid maintaining
separate copies of even such small functions, we simply include that new
file from util.c.  Then, the separate applications that need to use
safewrite simply compile and link with util-lib.c.

Of course, this does mean that each of those applications will
containing two copies of these functions.  However, the functions
are so small that it's not worth worrying about that.

* src/util.c (saferead, safewrite): Move function definitions to
util-lib.c and include that .c file.
* src/util-lib.c (saferead, safewrite): New file.  Functions from src/util.c
with slight change (s/int r =/ssize_t r =/) to reflect read/write return type.
* src/util-lib.h: Declare the two moved functions.
* src/util.h: Remove declarations.  Include src/util-lib.h.
* proxy/Makefile.am (libvirt_proxy_SOURCES): Add src/util-lib.c.
* qemud/Makefile.am (libvirtd_SOURCES): Likewise.
* src/Makefile.am (virsh_SOURCES): Add util-lib.c.  Remove some SP-before-TAB.
2008-02-22 15:53:13 +00:00
build-aux Pull useless-if-before-free from gnulib, and update. 2008-02-13 21:52:19 +00:00
docs Avoid "make syntax-check" failure. 2008-02-20 17:26:01 +00:00
gnulib Pull useless-if-before-free from gnulib, and update. 2008-02-13 21:52:19 +00:00
include Added main internal storage driver impl 2008-02-20 15:34:52 +00:00
m4 Use gnulib, starting with its physmem and getaddrinfo modules. 2007-12-05 21:31:07 +00:00
po Update to work with new policy kit APIs 2008-02-20 16:54:35 +00:00
proxy Move safewrite and saferead to a separate file. 2008-02-22 15:53:13 +00:00
python Added python binding for storage APIs 2008-02-20 15:26:22 +00:00
qemud Move safewrite and saferead to a separate file. 2008-02-22 15:53:13 +00:00
scripts Ignore /usr/include in coverage reports 2007-07-25 23:18:15 +00:00
src Move safewrite and saferead to a separate file. 2008-02-22 15:53:13 +00:00
tests With --without-xen, avoid warning about unused function. 2008-02-22 12:33:47 +00:00
.cvsignore Ignore a few more files 2008-01-02 16:31:21 +00:00
.x-sc_avoid_if_before_free Remove more useless if tests before "free"-like functions. 2008-02-07 16:49:29 +00:00
.x-sc_no_have_config_h Enable another syntax-check rule. 2008-02-07 19:20:36 +00:00
.x-sc_require_config_h Enable the <config.h>-requiring test; fix violations 2008-01-29 18:15:54 +00:00
.x-sc_trailing_blank Ignore doc files for syntax check 2008-02-20 15:57:34 +00:00
acinclude.m4 Fix compat for old pkg-config and gnutls 2008-01-22 21:30:05 +00:00
AUTHORS Support VNC keymap option with QEMU (Daniel Hokka Zakrisson) 2008-01-15 15:18:33 +00:00
autobuild.sh autobuild.sh: Run "make syntax-check", so the autobuilder does this. 2008-02-07 19:19:45 +00:00
autogen.sh Remove all trailing blanks; turn on the rule to detect them. 2008-02-05 19:27:37 +00:00
bootstrap Pull useless-if-before-free from gnulib, and update. 2008-02-13 21:52:19 +00:00
ChangeLog Move safewrite and saferead to a separate file. 2008-02-22 15:53:13 +00:00
configure.in Update to work with new policy kit APIs 2008-02-20 16:54:35 +00:00
COPYING.LIB Initial revision 2005-11-02 12:50:21 +00:00
GNUmakefile Add framework for code style- and syntax-checking rules. 2008-01-29 17:42:39 +00:00
libvirt.pc.in * libvirt.pc.in: applied patch from Daniel Berrange to fix --cflags 2006-03-24 13:18:12 +00:00
libvirt.spec.in Added disk partition storage pool backend 2008-02-20 15:52:17 +00:00
Makefile.am Enable the <config.h>-requiring test; fix violations 2008-01-29 18:15:54 +00:00
Makefile.cfg Enable another syntax-check rule. 2008-02-07 19:20:36 +00:00
Makefile.maint Added main internal storage driver impl 2008-02-20 15:34:52 +00:00
NEWS Regenerate docs to include storage APIs 2008-02-20 15:20:44 +00:00
README Correct typos in the documentation (Atsushi SAKAI) 2008-01-24 10:15:13 +00:00
RENAMES Mon Jun 11 13:25:00 BST 2007 Richard W.M. Jones <rjones@redhat.com> 2007-06-11 12:25:06 +00:00
TODO Remove all trailing blanks; turn on the rule to detect them. 2008-02-05 19:27:37 +00:00
virsh.1 Remove all trailing blanks; turn on the rule to detect them. 2008-02-05 19:27:37 +00:00

         LibVirt : simple API for virtualization

  Libvirt is a C toolkit to interact with the virtualization capabilities
of recent versions of Linux (and other OSes). It is free software
available under the GNU Lesser General Public License. Virtualization of
the Linux Operating System means the ability to run multiple instances of
Operating Systems concurrently on a single hardware system where the basic
resources are driven by a Linux instance. The library aim at providing
long term stable C API initially for the Xen paravirtualization but
should be able to integrate other virtualization mechanisms if needed.

Daniel Veillard <veillard@redhat.com>