Remove all trailing blanks; turn on the rule to detect them.

* Makefile.cfg (local-checks-to-skip): Remove sc_trailing_blank.
* .x-sc_trailing_blank: New file, to exempt the few binary files.
This commit is contained in:
Jim Meyering 2008-02-05 19:27:37 +00:00
parent 889eab9348
commit e04912a9f0
86 changed files with 565 additions and 557 deletions

3
.x-sc_trailing_blank Normal file
View File

@ -0,0 +1,3 @@
\.png$
\.fig$
\.gif$

View File

@ -1,3 +1,9 @@
Tue Feb 3 20:26:53 CET 2008 Jim Meyering <meyering@redhat.com>
Remove all trailing blanks; turn on the rule to detect them.
* Makefile.cfg (local-checks-to-skip): Remove sc_trailing_blank.
* .x-sc_trailing_blank: New file, to exempt the few binary files.
Tue Feb 3 11:21:45 EST 2008 Daniel P. Berrange <berrange@redhat.com>
* src/xml.c, src/xend_internal.c: Allow use of kernel+initrd

View File

@ -30,7 +30,6 @@ local-checks-to-skip = \
makefile-check \
sc_no_have_config_h \
sc_tight_scope \
sc_trailing_blank \
sc_GPL_version \
sc_always_defined_macros \
sc_cast_of_alloca_return_value \

66
NEWS
View File

@ -17,15 +17,15 @@ Releases
various english fixes (Bruce Montague), OCaml docs links (Richard Jones),
describe the various bindings add Ruby link, Windows support page
(Richard Jones), authentication documentation updates (Daniel Berrange)
- Bug fixes: NUMA topology error handling (Beth Kon), NUMA topology
cells without CPU (Beth Kon), XML to/from XM bridge config (Daniel
Berrange), XM processing of vnc parameters (Daniel Berrange), Reset
migration source after failure (Jim Paris), negative integer in config
migration source after failure (Jim Paris), negative integer in config
(Tatsuro Enokura), zero terminating string buffer, detect integer
overflow (Jim Meyering), QEmu command line ending fixes (Daniel Berrange),
recursion problem in the daemon (Daniel Berrange), HVM domain with CDRom
(Masayuki Sunou), off by one error in NUMA cpu count (Beth Kon),
(Masayuki Sunou), off by one error in NUMA cpu count (Beth Kon),
avoid xend errors when adding disks (Masayuki Sunou), compile error
(Chris Lalancette), transposed fwrite args (Jim Meyering), compile
without xen and on solaris (Jim Paris), parsing of interface names
@ -42,17 +42,17 @@ Releases
parameter setting in XM config (Saori Fukuta), credential handling
fixes (Daniel Berrange), fix compatibility with Xen 3.2.0 (Daniel
Berrange)
- Improvements: /etc/libvirt/qemu.conf configuration for QEMU driver
(Daniel Berrange), NUMA cpu pinning in config files (DV and Saori Fukuta),
CDRom media change in KVM/QEMU (Daniel Berrange), tests for
<shareable/> in configs, pinning inactive domains for Xen 3.0.3
(Saori Fukuta), use gnulib for portability enhancement (Jim Meyering),
--without-libvirtd config option (Richard Jones), Python bindings for
NUMA, add extra utility functions to buffer (Richard Jones),
NUMA, add extra utility functions to buffer (Richard Jones),
separate qparams module for handling query parameters (Richard Jones)
- Code cleanups: remove virDomainRestart from API as it was never used
- Code cleanups: remove virDomainRestart from API as it was never used
(Richard Jones), constify params for attach/detach APIs (Daniel Berrange),
gcc printf attribute checkings (Jim Meyering), refactoring of device
parsing code and shell escaping (Daniel Berrange), virsh schedinfo
@ -72,20 +72,20 @@ Releases
port (Richard Jones), disable the proxy if using PolicyKit, readline
availability detection, test libvirtd's config-processing code (Jim
Meyering), use a variable name as sizeof argument (Jim Meyering)
0.3.3: Sep 30 2007:
- New features: Avahi mDNS daemon export (Daniel Berrange),
NUMA support (Beth Kan)
- Documentation: cleanups (Toth Istvan), typos (Eduardo Pereira),
NUMA support (Beth Kan)
- Documentation: cleanups (Toth Istvan), typos (Eduardo Pereira),
- Bug fixes: memory corruption on large dumps (Masayuki Sunou), fix
virsh vncdisplay command exit (Masayuki Sunou), Fix network stats
TX/RX result (Richard Jones), warning on Xen 3.0.3 (Richard Jones),
missing buffer check in virDomainXMLDevID (Hugh Brock), avoid zombies
when using remote (Daniel Berrange), xend connection error message
(Richard Jones), avoid ssh tty prompt (Daniel Berrange), username
handling for remote URIs (Fabian Deutsch), fix potential crash
handling for remote URIs (Fabian Deutsch), fix potential crash
on multiple input XML tags (Daniel Berrange), Solaris Xen hypercalls
fixup (Mark Johnson)
- Improvements: OpenVZ support (Shuveb Hussain and Anoop Cyriac),
@ -103,7 +103,7 @@ Releases
0.3.2: Aug 21 2007:
- New features: KVM migration and save/restore (Jim Paris),
- New features: KVM migration and save/restore (Jim Paris),
added API for migration (Richard Jones), added APIs for block device and
interface statistic (Richard Jones).
- Documentation: examples for XML network APIs,
@ -124,10 +124,10 @@ Releases
speedup of domain queries on Xen (Daniel berrange), augment XML dumps
with interface devices names (Richard Jones), internal API to query
drivers for features (Richard Jones).
- Cleanups: Improve virNodeGetInfo implentation (Daniel berrange),
general UUID code cleanup (Daniel berrange), fix API generator
file selection.
file selection.
0.3.1: Jul 24 2007:
@ -161,13 +161,13 @@ Releases
- Secure Remote support (Richard Jones).
See the remote page
of the documentation
- Documentation: remote support (Richard Jones), description of
the URI connection strings (Richard Jones), update of virsh man
page, matrix of libvirt API/hypervisor support with version
informations (Richard Jones)
- Bug fixes: examples Makefile.am generation (Richard Jones),
SetMem fix (Mark Johnson), URI handling and ordering of
- Bug fixes: examples Makefile.am generation (Richard Jones),
SetMem fix (Mark Johnson), URI handling and ordering of
drivers (Daniel Berrange), fix virsh help without hypervisor (Richard
Jones), id marshalling fix (Daniel Berrange), fix virConnectGetMaxVcpus
on remote (Richard Jones), avoid a realloc leak (Jim Meyering), scheduler
@ -177,12 +177,12 @@ Releases
XML serialization bugs
- Improvements: QEmu switch to XDR-based protocol (Dan Berrange),
device attach/detach commands (Masayuki Sunou), OCaml bindings
(Richard Jones), new entry points virDomainGetConnect and
virNetworkGetConnect useful for bindings (Richard Jones),
(Richard Jones), new entry points virDomainGetConnect and
virNetworkGetConnect useful for bindings (Richard Jones),
reunitifaction of remote and qemu daemon under a single libvirtd
with a config file (Daniel Berrange)
- Cleanups: parsing of connection URIs (Richard Jones), messages
from virsh (Saori Fukuta), Coverage files (Daniel Berrange),
from virsh (Saori Fukuta), Coverage files (Daniel Berrange),
Solaris fixes (Mark Johnson), avoid [r]index calls (Richard Jones),
release information in Xen backend, virsh cpupin command cleanups
(Masayuki Sunou), xen:/// suppport as standard Xen URI (Richard Jones and
@ -202,7 +202,7 @@ Releases
0.2.3: Jun 8 2007:
- Documentation: documentation for upcoming remote access (Richard Jones),
virConnectNumOfDefinedDomains doc (Jan Michael), virsh help messages
for dumpxml and net-dumpxml (Chris Wright),
for dumpxml and net-dumpxml (Chris Wright),
- Bug fixes: RelaxNG schemas regexp fix (Robin Green), RelaxNG arch bug
(Mark McLoughlin), large buffers bug fixes (Shigeki Sakamoto), error
on out of memory condition (Shigeki Sakamoto), virshStrdup fix, non-root
@ -214,7 +214,7 @@ Releases
QEmu memory bug (Daniel Berrange), memory leak fix (Masayuki Sunou),
fix compiler flags (Richard Jones), remove type ioemu on recent Xen
HVM for paravirt drivers (Saori Fukuta), uninitialized string bug
(Masayuki Sunou), allow init even if the daemon is not running,
(Masayuki Sunou), allow init even if the daemon is not running,
XML to config fix (Daniel Berrange)
- Improvements: add a special error class for the test module (Richard
Jones), virConnectGetCapabilities on proxy (Richard Jones), allow
@ -236,10 +236,10 @@ Releases
0.2.2: Apr 17 2007:
- Documentation: fix errors due to Amaya (with Simon Hernandez),
- Documentation: fix errors due to Amaya (with Simon Hernandez),
virsh uses kB not bytes (Atsushi SAKAI), add command line help to
qemud (Richard Jones), xenUnifiedRegister docs (Atsushi SAKAI),
strings typos (Nikolay Sivov), ilocalization probalem raised by
strings typos (Nikolay Sivov), ilocalization probalem raised by
Thomas Canniot
- Bug fixes: virsh memory values test (Masayuki Sunou), operations without
libvirt_qemud (Atsushi SAKAI), fix spec file (Florian La Roche, Jeremy
@ -251,26 +251,26 @@ Releases
Berrange), bridged config configuration (Daniel Berrange), erroneous
XEN_V2_OP_SETMAXMEM value (Masayuki Sunou), memory free error (Mark
McLoughlin), set VIR_CONNECT_RO on read-only connections (S.Sakamoto),
avoid memory explosion bug (Daniel Berrange), integer overflow
avoid memory explosion bug (Daniel Berrange), integer overflow
for qemu CPU time (Daniel Berrange), QEMU binary path check (Daniel
Berrange)
- Cleanups: remove some global variables (Jim Meyering), printf-style
functions checks (Jim Meyering), better virsh error messages, increase
compiler checkings and security (Daniel Berrange), virBufferGrow usage
and docs, use calloc instead of malloc/memset, replace all sprintf by
snprintf, avoid configure clobbering user's CTAGS (Jim Meyering),
snprintf, avoid configure clobbering user's CTAGS (Jim Meyering),
signal handler error cleanup (Richard Jones), iptables internal code
claenup (Mark McLoughlin), unified Xen driver (Richard Jones),
cleanup XPath libxml2 calls, IPTables rules tightening (Daniel
Berrange),
Berrange),
- Improvements: more regression tests on XML (Daniel Berrange), Python
bindings now generate exception in error cases (Richard Jones),
Python bindings for vir*GetAutoStart (Daniel Berrange),
handling of CD-Rom device without device name (Nobuhiro Itou),
fix hypervisor call to work with Xen 3.0.5 (Daniel Berrange),
DomainGetOSType for inactive domains (Daniel Berrange), multiple boot
devices for HVM (Daniel Berrange),
devices for HVM (Daniel Berrange),
0.2.1: Mar 16 2007:
@ -293,7 +293,7 @@ Releases
Berrange), pointer/int mismatch (Richard Jones), configure time
selection of drivers, libvirt spec hacking (Daniel Berrange)
- Add support for network autostart and init scripts (Mark McLoughlin)
- New API virConnectGetCapabilities() to detect the virtualization
- New API virConnectGetCapabilities() to detect the virtualization
capabilities of a host (Richard Jones)
- Minor improvements: qemud signal handling (Mark), don't shutdown or reboot
domain0 (Kazuki Mizushima), QEmu version autodetection (Daniel Berrange),
@ -312,7 +312,7 @@ Releases
parsing (Richard Jones)
- Add support for QEmu and KVM virtualization (Daniel Berrange)
- Add support for network configuration (Mark McLoughlin)
- Minor improvements: regression testing (Daniel Berrange),
- Minor improvements: regression testing (Daniel Berrange),
localization string updates
@ -375,7 +375,7 @@ Releases
- Support for localization of strings using gettext (Daniel Berrange)
- Support for new Xen-3.0.3 cdrom and disk configuration (Daniel Berrange)
- Support for setting VNC port when creating domains with new
xend config files (Daniel Berrange)
xend config files (Daniel Berrange)
- Fix bug when running against xen-3.0.2 hypercalls (Jim Fehlig)
- Fix reconnection problem when talking directly to http xend
@ -409,7 +409,7 @@ Releases
floppy and cdrom (Daniel Berrange), features block in XML to report/ask
PAE, ACPI, APIC for HVM domains (Daniel Berrange), fail saide-effect
operations when using read-only connection, large improvements to test
driver (Daniel Berrange)
driver (Daniel Berrange)
- documentation: spelling (Daniel Berrange), test driver examples.

4
TODO
View File

@ -6,7 +6,7 @@ TODO:
Other environment:
- support for UML
+ UML control layer should be easy at least for one user but incomplete
Probable TODOs:
@ -20,7 +20,7 @@ Would-be-nice TODO:
Cleanup:
- now that libxml2 is linked in, drop hash.[ch] and get back to libxml2 ones ?
same for the buffers
same for the buffers
Autoconf:
- On Debian and other platforms, C++ compiler is required because

View File

@ -16,7 +16,7 @@ rm -rf coverage
./autogen.sh --prefix=$AUTOBUILD_INSTALL_ROOT \
--enable-test-coverage \
--enable-compile-warnings=error
--enable-compile-warnings=error
make
make install

View File

@ -2,7 +2,7 @@
# Run this to generate all the initial makefiles, etc.
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
test -z "$srcdir" && srcdir=.
THEDIR=`pwd`
cd $srcdir
@ -70,6 +70,6 @@ if test x$OBJ_DIR != x; then
fi
$srcdir/configure "$@" && {
echo
echo
echo "Now type 'make' to compile libvirt."
}

View File

@ -7,7 +7,7 @@ function translate(str) {
sub(/[0-9][0-9][0-9][0-9][0-9]+/, "<bug number='&'/>", str)
return(str)
}
BEGIN {
BEGIN {
nb_entry = 0
in_entry = 0
in_item = 0
@ -20,7 +20,7 @@ END {
print "</log>"
}
/^[ \t]*$/ { next }
/^[A-Za-z0-9]/ {
/^[A-Za-z0-9]/ {
match($0, "\(.*\) \([A-Z]+\) \([0-9][0-9][0-9][0-9]\) \(.*\) <\(.*\)>", loge)
if (in_item == 1) printf("%s</item>\n", translate(item))
if (in_entry == 1) print " </entry>"
@ -41,7 +41,7 @@ END {
match($0, "[ \t]*. *\(.*\)", loge)
item = loge[1]
}
/^[ \t]*[a-zA-Z0-9\#]/ {
/^[ \t]*[a-zA-Z0-9\#]/ {
if (in_item == 1) {
match($0, "[ \t]*\(.*\)[ \t]*", loge)
item = sprintf("%s %s", item, loge[1])

View File

@ -24,7 +24,7 @@
<ul><!-- style="margin-left: -1em" -->
<li><a style="font-weight:bold"
href="{$href_base}index.html">Main Menu</a></li>
<li><a style="font-weight:bold"
<li><a style="font-weight:bold"
href="{$href_base}html/index.html">Modules Index</a></li>
<li><a style="font-weight:bold"
href="index.html">API Menu</a></li>
@ -35,13 +35,13 @@
<a href="https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id={@number}">
<xsl:value-of select="@number"/></a>
</xsl:template>
<xsl:template match="item">
<li><xsl:apply-templates/></li>
</xsl:template>
<xsl:template match="entry">
<p>
<b><xsl:value-of select="@who"/></b>
<xsl:text> </xsl:text>

View File

@ -108,7 +108,7 @@ maintainer-clean-local: clean-local
rebuild: api all
install-data-local:
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)
-@INSTALL@ -m 0644 $(srcdir)/libvir.html $(srcdir)/FAQ.html \
$(srcdir)/redhat.gif $(srcdir)/Libxml2-Logo-90x34.gif \

View File

@ -311,7 +311,7 @@ class index:
self.analyze_dict("structs", self.structs)
self.analyze_dict("typedefs", self.typedefs)
self.analyze_dict("macros", self.macros)
class CLexer:
"""A lexer for the C language, tokenize the input by reading and
analyzing it line by line"""
@ -343,7 +343,7 @@ class CLexer:
else:
line = line + n
return line
def getlineno(self):
return self.lineno
@ -512,12 +512,12 @@ class CLexer:
else:
break
self.tokens.append(('name', line[s:i]))
tok = self.tokens[0]
self.tokens = self.tokens[1:]
self.last = tok
return tok
class CParser:
"""The C module parser"""
def __init__(self, filename, idx = None):
@ -672,7 +672,7 @@ class CParser:
l = string.strip(l)
desc = desc + " " + l
del lines[0]
desc = string.strip(desc)
if quiet == 0:
@ -742,7 +742,7 @@ class CParser:
l = string.strip(l)
desc = desc + " " + l
del lines[0]
desc = string.strip(desc)
if quiet == 0:
@ -843,7 +843,7 @@ class CParser:
else:
desc = desc + " " + l
del lines[0]
retdesc = string.strip(retdesc)
desc = string.strip(desc)
@ -921,7 +921,7 @@ class CParser:
try:
self.defines.append(apstr)
if string.find(apstr, 'ENABLED') != -1:
self.conditionals.append("defined(%s)" % apstr)
self.conditionals.append("defined(%s)" % apstr)
except:
pass
elif name == "#ifndef":
@ -929,7 +929,7 @@ class CParser:
try:
self.defines.append(apstr)
if string.find(apstr, 'ENABLED') != -1:
self.conditionals.append("!defined(%s)" % apstr)
self.conditionals.append("!defined(%s)" % apstr)
except:
pass
elif name == "#if":
@ -1054,7 +1054,7 @@ class CParser:
return token
token = self.token()
return token
#
# Parse a C code block, used for functions it parse till
# the balancing } included
@ -1089,7 +1089,7 @@ class CParser:
elif oldtok[0] == "name" and oldtok[1][0:7] == "LIBXEN_":
self.index_add_ref(oldtok[1], self.filename,
0, "typedef")
else:
token = self.token()
return token
@ -1222,7 +1222,7 @@ class CParser:
if token == None:
return token
while token[0] == "name" and (
while token[0] == "name" and (
token[1] == "const" or \
token[1] == "unsigned" or \
token[1] == "signed"):
@ -1238,7 +1238,7 @@ class CParser:
else:
self.type = self.type + " " + token[1]
# some read ahead for long long
# some read ahead for long long
oldtmp = token
token = self.token()
if token[0] == "name" and token[1] == "long":
@ -1263,7 +1263,7 @@ class CParser:
self.type = tmp[1]
else:
self.type = self.type + " " + tmp[1]
elif token[0] == "name" and token[1] == "struct":
if self.type == "":
self.type = token[1]
@ -1553,7 +1553,7 @@ class CParser:
token = self.token()
else:
break
return token
def parse(self):
@ -1569,7 +1569,7 @@ class CParser:
return
self.parseTopComment(self.top_comment)
return self.index
class docBuilder:
"""A documentation builder"""
@ -1663,7 +1663,7 @@ class docBuilder:
self.headers[file] = None;
self.scanHeaders()
self.scanModules()
def modulename_file(self, file):
module = os.path.basename(file)
if module[-2:] == '.h':
@ -1757,7 +1757,7 @@ class docBuilder:
else:
output.write(" <variable name='%s' file='%s'/>\n" % (
name, self.modulename_file(id.header)))
def serialize_function(self, output, name):
id = self.idx.functions[name]
if name == debugsym:

View File

@ -19,7 +19,7 @@ libvirt.devhelp $(HTML_FILES): devhelp.xsl html.xsl $(top_srcdir)/docs/libvirt-a
-@(if [ -x $(XSLTPROC) ] ; then \
$(XSLTPROC) --nonet -o $(srcdir)/libvirt.devhelp devhelp.xsl $(top_srcdir)/docs/libvirt-api.xml ; fi );
install-data-local:
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(DEVHELP_DIR)
-@INSTALL@ -m 0644 libvirt.devhelp $(DESTDIR)$(DEVHELP_DIR)
-@INSTALL@ -m 0644 $(EXTRA_FORMAT) $(DESTDIR)$(DEVHELP_DIR)

View File

@ -1,16 +1,16 @@
.synopsis, .classsynopsis
.synopsis, .classsynopsis
{
background: #eeeeee;
border: solid 1px #aaaaaa;
padding: 0.5em;
}
.programlisting
.programlisting
{
background: #eeeeff;
border: solid 1px #aaaaff;
padding: 0.5em;
}
.variablelist
.variablelist
{
padding: 4px;
margin-left: 3em;
@ -19,39 +19,39 @@
{
vertical-align: top;
}
table.navigation
table.navigation
{
background: #ffeeee;
border: solid 1px #ffaaaa;
margin-top: 0.5em;
margin-bottom: 0.5em;
}
.navigation a
.navigation a
{
color: #770000;
}
.navigation a:visited
.navigation a:visited
{
color: #550000;
}
.navigation .title
.navigation .title
{
font-size: 200%;
}
div.refnamediv
div.refnamediv
{
margin-top: 2em;
}
div.gallery-float
div.gallery-float
{
float: left;
padding: 10px;
}
div.gallery-float img
div.gallery-float img
{
border-style: none;
}
div.gallery-spacer
div.gallery-spacer
{
clear: both;
}

View File

@ -22,9 +22,9 @@ install-data-local:
-@INSTALL@ -m 0644 $(srcdir)/*.html $(srcdir)/*.c $(srcdir)/*.xml \
$(srcdir)/*.xsl $(srcdir)/*.res $(DESTDIR)$(HTML_DIR)
EXTRA_DIST=examples.xsl index.py examples.xml
EXTRA_DIST=examples.xsl index.py examples.xml
noinst_PROGRAMS=info1 suspend
noinst_PROGRAMS=info1 suspend
info1_SOURCES=info1.c
info1_LDFLAGS=
@ -36,7 +36,7 @@ suspend_LDFLAGS=
suspend_DEPENDENCIES= $(DEPS)
suspend_LDADD= $(LDADDS)
valgrind:
valgrind:
$(MAKE) CHECKER='valgrind' tests
tests: $(noinst_PROGRAMS)

View File

@ -18,9 +18,9 @@
</form>
<ul><!-- style="margin-left: -1em" -->
<li><a href="{$href_base}index.html">Home</a></li>
<li><a style="font-weight:bold"
<li><a style="font-weight:bold"
href="{$href_base}docs.html">Developer Menu</a></li>
<li><a style="font-weight:bold"
<li><a style="font-weight:bold"
href="{$href_base}html/index.html">API Menu</a></li>
<xsl:for-each select="/examples/sections/section">
<li><a href="#{@name}"><xsl:value-of select="@name"/> Examples</a></li>

View File

@ -4,8 +4,8 @@ The examples are:
dominfo.py - print information about a running domU based on the results of
virDomainGetInfo and virDomainGetXMLDesc
domstart.py - create a domU from an XML description if the domU isn't
running yet
domstart.py - create a domU from an XML description if the domU isn't
running yet
domsave.py - save all running domU's into a directory
domrestore.py - restore domU's from their saved files in a directory

View File

@ -26,7 +26,7 @@ def print_xml(key, ctx, path):
value = res[0].content
print_entry(key, value)
return value
if not os.access("/proc/xen", os.R_OK):
print 'System is not running a Xen kernel'
sys.exit(1)

View File

@ -36,5 +36,5 @@ for id in doms:
print "done"
else:
print "error %d" % ret
#pdb.set_trace()

View File

@ -18,7 +18,7 @@ def read_domain(fname):
doc = libxml2.parseDoc(xmldesc)
name = doc.xpathNewContext().xpathEval("/domain/name")[0].content
return (name, xmldesc)
def usage():
print 'Usage: %s domain.xml' % sys.argv[0]
print ' Check that the domain described by DOMAIN.XML is running'

View File

@ -27,7 +27,7 @@ static int
checkDomainState(virDomainPtr dom) {
virDomainInfo info; /* the informations being fetched */
int ret;
ret = virDomainGetInfo(dom, &info);
if (ret < 0) {
return(-1);
@ -124,7 +124,7 @@ int main(int argc, char **argv) {
fprintf(stderr, "Failed find a running guest domain\n");
goto error;
}
SuspendAndResumeDomain(id);
error:

View File

@ -231,8 +231,8 @@ support a variety of options:</p><ol><li>Userspace SLIRP stack
VMs to have outgoing access. Example configs are:</p>
<pre>&lt;interface type='user'/&gt;</pre>
<pre>
&lt;interface type='user'&gt;
&lt;mac address="11:22:33:44:55:66"/&gt;
&lt;interface type='user'&gt;
&lt;mac address="11:22:33:44:55:66"/&gt;
&lt;/interface&gt;
</pre>
</li>
@ -276,7 +276,7 @@ support a variety of options:</p><ol><li>Userspace SLIRP stack
&lt;source dev='br0'/&gt;
&lt;target dev='vnet7'/&gt;
&lt;mac address="11:22:33:44:55:66"/&gt;
&lt;/interface&gt;</pre>
&lt;/interface&gt;</pre>
</li>
<li>Generic connection to LAN
<p>Provides a means for the administrator to execute an arbitrary script

View File

@ -181,7 +181,7 @@ The content of this structure is not made public by the API.
unsigned long long cpuTime : the CPU time used in nanoseconds
}</pre>
a virDomainInfoPtr is a pointer to a virDomainInfo structure.
A pointe to a virDomainInterfaceStats structure
<h3><a name="virDomainInterfaceStatsStruct" id="virDomainInterfaceStatsStruct">Structure virDomainInterfaceStatsStruct</a></h3><pre class="programlisting">Structure virDomainInterfaceStatsStruct<br />struct _virDomainInterfaceStats {
long long rx_bytes

View File

@ -34,7 +34,7 @@
# Bye
#
# Then run the script in the doc subdir, it will create the symbols and
# word tables and populate them with informations extracted from
# word tables and populate them with informations extracted from
# the libvirt-api.xml API description, and make then accessible read-only
# by nobody@loaclhost the user expected to be Apache's one
#
@ -187,7 +187,7 @@ def checkTables(db, verbose = 1):
except:
pass
return 0
def openMySQL(db="libvir", passwd=None, verbose = 1):
global DB
@ -231,7 +231,7 @@ def updateWord(name, symbol, relevance):
print "UPDATE words SET relevance = %d where name = '%s' and symbol = '%s'" % (relevance, name, symbol)
print sys.exc_type, sys.exc_value
return -1
return ret
def updateSymbol(name, module, type, desc):
@ -272,9 +272,9 @@ def updateSymbol(name, module, type, desc):
print """UPDATE symbols SET module='%s', type='%s', descr='%s' where name='%s'""" % (module, type, desc, name)
print sys.exc_type, sys.exc_value
return -1
return ret
def addFunction(name, module, desc = ""):
return updateSymbol(name, module, 'function', desc)
@ -321,7 +321,7 @@ def addPage(resource, title):
print """UPDATE pages SET title='%s' WHERE resource='%s'""" % (title, resource)
print sys.exc_type, sys.exc_value
return -1
return ret
def updateWordHTML(name, resource, desc, id, relevance):
@ -361,7 +361,7 @@ def updateWordHTML(name, resource, desc, id, relevance):
print """UPDATE wordsHTML SET section='%s', id='%s', relevance='%d' where name='%s' and resource='%s'""" % (desc, id, relevance, name, resource)
print sys.exc_type, sys.exc_value
return -1
return ret
def checkXMLMsgArchive(url):
@ -383,9 +383,9 @@ def checkXMLMsgArchive(url):
return -1
except:
return -1
return row[0]
def addXMLMsgArchive(url, title):
global DB
@ -414,7 +414,7 @@ def addXMLMsgArchive(url, title):
except:
print "addXMLMsgArchive failed command: %s" % (cmd)
return -1
return((int)(row[0]))
def updateWordArchive(name, id, relevance):
@ -444,7 +444,7 @@ def updateWordArchive(name, id, relevance):
print """UPDATE wordsArchive SET relevance='%d' where name='%s' and ID='%d'""" % (relevance, name, id)
print sys.exc_type, sys.exc_value
return -1
return ret
#########################################################################
@ -501,7 +501,7 @@ def cleanupWordsString(str):
str = string.replace(str, "\xc2", " ")
str = string.replace(str, "\xa0", " ")
return str
def cleanupDescrString(str):
str = string.replace(str, "'", " ")
str = string.replace(str, "\n", " ")
@ -557,7 +557,7 @@ def addWord(word, module, symbol, relevance):
wordsDict[word] = {}
wordsDict[word][(module, symbol)] = relevance
return relevance
def addString(str, module, symbol, relevance):
if str == None or len(str) < 3:
return -1
@ -603,7 +603,7 @@ def addWordHTML(word, resource, id, section, relevance):
d = wordsDictHTML[word];
d[resource] = (relevance, id, section)
return relevance
def addStringHTML(str, resource, id, section, relevance):
if str == None or len(str) < 3:
return -1
@ -650,7 +650,7 @@ def addWordArchive(word, id, relevance):
d = wordsDictArchive[word];
d[id] = relevance
return relevance
def addStringArchive(str, id, relevance):
if str == None or len(str) < 3:
return -1
@ -692,7 +692,7 @@ def foundExport(file, symbol):
for word in l:
addWord(word, file, symbol, 10)
return 1
def analyzeAPIFile(top):
count = 0
name = top.prop("name")
@ -711,7 +711,7 @@ def analyzeAPIFile(top):
def analyzeAPIFiles(top):
count = 0
cur = top.children
while cur != None:
if cur.type == 'text':
cur = cur.next
@ -897,7 +897,7 @@ def analyzeAPIFunction(top):
def analyzeAPISymbols(top):
count = 0
cur = top.children
while cur != None:
if cur.type == 'text':
cur = cur.next
@ -1129,7 +1129,7 @@ def scanXMLDateArchive(t = None, force = 0):
pass
return newmsg
#########################################################################
# #

View File

@ -12,10 +12,10 @@ Functional description:
- stop
- suspend
- resume
- monitor
- monitor
More advanced features should be allowed as future extensions, but
are not expected to be provided in first shipment.
Open enough Licence that customers can link their apps to it (LGPL)
Small and contained enough that we can use it as a way to
@ -32,8 +32,8 @@ Python code on top driving the hypervisor.
are not uncommon, and it is very low level usually without comment about
the function or its arguments. They are usually only called once in the
whole tree by the python bindings. In essence it looks like the Xen project
was not implemented with the idea of reusing that part of the code by
applications.
was not implemented with the idea of reusing that part of the code by
applications.
Indeed most of the userland code coming with Xen is built on Python,
like xend the xen daemon running on domain 0 or the xenstored daemon which
manage the state of the domains launched.
@ -54,7 +54,7 @@ The IBM way:
------------
Here is supposition about code that I can't instanciate except by looking
at said code but it looks that IBM also needed a C programmatic API to
at said code but it looks that IBM also needed a C programmatic API to
manage the Xen domain definitions. Their solution was to build (Rusty
Russell did this) an LGPL C API connecting directly to the xenstore
daemon (./tools/xenstore/*). In a way this is quite more fragile as it depends

View File

@ -54,11 +54,11 @@ and check the <a href="ChangeLog.html">ChangeLog</a> to gauge progress.</p>
<li>Bug fixes: NUMA topology error handling (Beth Kon), NUMA topology
cells without CPU (Beth Kon), XML to/from XM bridge config (Daniel
Berrange), XM processing of vnc parameters (Daniel Berrange), Reset
migration source after failure (Jim Paris), negative integer in config
migration source after failure (Jim Paris), negative integer in config
(Tatsuro Enokura), zero terminating string buffer, detect integer
overflow (Jim Meyering), QEmu command line ending fixes (Daniel Berrange),
recursion problem in the daemon (Daniel Berrange), HVM domain with CDRom
(Masayuki Sunou), off by one error in NUMA cpu count (Beth Kon),
(Masayuki Sunou), off by one error in NUMA cpu count (Beth Kon),
avoid xend errors when adding disks (Masayuki Sunou), compile error
(Chris Lalancette), transposed fwrite args (Jim Meyering), compile
without xen and on solaris (Jim Paris), parsing of interface names
@ -82,10 +82,10 @@ and check the <a href="ChangeLog.html">ChangeLog</a> to gauge progress.</p>
&lt;shareable/&gt; in configs, pinning inactive domains for Xen 3.0.3
(Saori Fukuta), use gnulib for portability enhancement (Jim Meyering),
--without-libvirtd config option (Richard Jones), Python bindings for
NUMA, add extra utility functions to buffer (Richard Jones),
NUMA, add extra utility functions to buffer (Richard Jones),
separate qparams module for handling query parameters (Richard Jones)
</li>
<li>Code cleanups: remove virDomainRestart from API as it was never used
<li>Code cleanups: remove virDomainRestart from API as it was never used
(Richard Jones), constify params for attach/detach APIs (Daniel Berrange),
gcc printf attribute checkings (Jim Meyering), refactoring of device
parsing code and shell escaping (Daniel Berrange), virsh schedinfo
@ -119,7 +119,7 @@ and check the <a href="ChangeLog.html">ChangeLog</a> to gauge progress.</p>
missing buffer check in virDomainXMLDevID (Hugh Brock), avoid zombies
when using remote (Daniel Berrange), xend connection error message
(Richard Jones), avoid ssh tty prompt (Daniel Berrange), username
handling for remote URIs (Fabian Deutsch), fix potential crash
handling for remote URIs (Fabian Deutsch), fix potential crash
on multiple input XML tags (Daniel Berrange), Solaris Xen hypercalls
fixup (Mark Johnson)</li>
<li>Improvements: OpenVZ support (Shuveb Hussain and Anoop Cyriac),
@ -137,7 +137,7 @@ and check the <a href="ChangeLog.html">ChangeLog</a> to gauge progress.</p>
</ul>
<h3>0.3.2: Aug 21 2007</h3>
<ul>
<li>New features: KVM migration and save/restore (Jim Paris),
<li>New features: KVM migration and save/restore (Jim Paris),
added API for migration (Richard Jones), added APIs for block device and
interface statistic (Richard Jones).</li>
<li>Documentation: examples for XML network APIs,
@ -200,8 +200,8 @@ and check the <a href="ChangeLog.html">ChangeLog</a> to gauge progress.</p>
the URI connection strings (Richard Jones), update of virsh man
page, matrix of libvirt API/hypervisor support with version
informations (Richard Jones)</li>
<li>Bug fixes: examples Makefile.am generation (Richard Jones),
SetMem fix (Mark Johnson), URI handling and ordering of
<li>Bug fixes: examples Makefile.am generation (Richard Jones),
SetMem fix (Mark Johnson), URI handling and ordering of
drivers (Daniel Berrange), fix virsh help without hypervisor (Richard
Jones), id marshalling fix (Daniel Berrange), fix virConnectGetMaxVcpus
on remote (Richard Jones), avoid a realloc leak (Jim Meyering), scheduler
@ -211,12 +211,12 @@ and check the <a href="ChangeLog.html">ChangeLog</a> to gauge progress.</p>
XML serialization bugs</li>
<li>Improvements: QEmu switch to XDR-based protocol (Dan Berrange),
device attach/detach commands (Masayuki Sunou), OCaml bindings
(Richard Jones), new entry points virDomainGetConnect and
virNetworkGetConnect useful for bindings (Richard Jones),
(Richard Jones), new entry points virDomainGetConnect and
virNetworkGetConnect useful for bindings (Richard Jones),
reunitifaction of remote and qemu daemon under a single libvirtd
with a config file (Daniel Berrange)</li>
<li>Cleanups: parsing of connection URIs (Richard Jones), messages
from virsh (Saori Fukuta), Coverage files (Daniel Berrange),
from virsh (Saori Fukuta), Coverage files (Daniel Berrange),
Solaris fixes (Mark Johnson), avoid [r]index calls (Richard Jones),
release information in Xen backend, virsh cpupin command cleanups
(Masayuki Sunou), xen:/// suppport as standard Xen URI (Richard Jones and
@ -248,7 +248,7 @@ and check the <a href="ChangeLog.html">ChangeLog</a> to gauge progress.</p>
QEmu memory bug (Daniel Berrange), memory leak fix (Masayuki Sunou),
fix compiler flags (Richard Jones), remove type ioemu on recent Xen
HVM for paravirt drivers (Saori Fukuta), uninitialized string bug
(Masayuki Sunou), allow init even if the daemon is not running,
(Masayuki Sunou), allow init even if the daemon is not running,
XML to config fix (Daniel Berrange)</li>
<li>Improvements: add a special error class for the test module (Richard
Jones), virConnectGetCapabilities on proxy (Richard Jones), allow
@ -270,10 +270,10 @@ and check the <a href="ChangeLog.html">ChangeLog</a> to gauge progress.</p>
</ul>
<h3>0.2.2: Apr 17 2007</h3>
<ul>
<li>Documentation: fix errors due to Amaya (with Simon Hernandez),
<li>Documentation: fix errors due to Amaya (with Simon Hernandez),
virsh uses kB not bytes (Atsushi SAKAI), add command line help to
qemud (Richard Jones), xenUnifiedRegister docs (Atsushi SAKAI),
strings typos (Nikolay Sivov), ilocalization probalem raised by
strings typos (Nikolay Sivov), ilocalization probalem raised by
Thomas Canniot</li>
<li>Bug fixes: virsh memory values test (Masayuki Sunou), operations without
libvirt_qemud (Atsushi SAKAI), fix spec file (Florian La Roche, Jeremy
@ -285,14 +285,14 @@ and check the <a href="ChangeLog.html">ChangeLog</a> to gauge progress.</p>
Berrange), bridged config configuration (Daniel Berrange), erroneous
XEN_V2_OP_SETMAXMEM value (Masayuki Sunou), memory free error (Mark
McLoughlin), set VIR_CONNECT_RO on read-only connections (S.Sakamoto),
avoid memory explosion bug (Daniel Berrange), integer overflow
avoid memory explosion bug (Daniel Berrange), integer overflow
for qemu CPU time (Daniel Berrange), QEMU binary path check (Daniel
Berrange)</li>
<li>Cleanups: remove some global variables (Jim Meyering), printf-style
functions checks (Jim Meyering), better virsh error messages, increase
compiler checkings and security (Daniel Berrange), virBufferGrow usage
and docs, use calloc instead of malloc/memset, replace all sprintf by
snprintf, avoid configure clobbering user's CTAGS (Jim Meyering),
snprintf, avoid configure clobbering user's CTAGS (Jim Meyering),
signal handler error cleanup (Richard Jones), iptables internal code
claenup (Mark McLoughlin), unified Xen driver (Richard Jones),
cleanup XPath libxml2 calls, IPTables rules tightening (Daniel
@ -303,7 +303,7 @@ and check the <a href="ChangeLog.html">ChangeLog</a> to gauge progress.</p>
handling of CD-Rom device without device name (Nobuhiro Itou),
fix hypervisor call to work with Xen 3.0.5 (Daniel Berrange),
DomainGetOSType for inactive domains (Daniel Berrange), multiple boot
devices for HVM (Daniel Berrange),
devices for HVM (Daniel Berrange),
</li>
</ul>
<h3>0.2.1: Mar 16 2007</h3>
@ -327,7 +327,7 @@ and check the <a href="ChangeLog.html">ChangeLog</a> to gauge progress.</p>
Berrange), pointer/int mismatch (Richard Jones), configure time
selection of drivers, libvirt spec hacking (Daniel Berrange)</li>
<li>Add support for network autostart and init scripts (Mark McLoughlin)</li>
<li>New API virConnectGetCapabilities() to detect the virtualization
<li>New API virConnectGetCapabilities() to detect the virtualization
capabilities of a host (Richard Jones)</li>
<li>Minor improvements: qemud signal handling (Mark), don't shutdown or reboot
domain0 (Kazuki Mizushima), QEmu version autodetection (Daniel Berrange),
@ -347,7 +347,7 @@ and check the <a href="ChangeLog.html">ChangeLog</a> to gauge progress.</p>
parsing (Richard Jones)</li>
<li>Add support for QEmu and KVM virtualization (Daniel Berrange)</li>
<li>Add support for network configuration (Mark McLoughlin)</li>
<li>Minor improvements: regression testing (Daniel Berrange),
<li>Minor improvements: regression testing (Daniel Berrange),
localization string updates</li>
</ul>
@ -1037,8 +1037,8 @@ support a variety of options:</p>
VMs to have outgoing access. Example configs are:</p>
<pre>&lt;interface type='user'/&gt;</pre>
<pre>
&lt;interface type='user'&gt;
&lt;mac address="11:22:33:44:55:66"/&gt;
&lt;interface type='user'&gt;
&lt;mac address="11:22:33:44:55:66"/&gt;
&lt;/interface&gt;
</pre>
</li>
@ -1082,7 +1082,7 @@ support a variety of options:</p>
&lt;source dev='br0'/&gt;
&lt;target dev='vnet7'/&gt;
&lt;mac address="11:22:33:44:55:66"/&gt;
&lt;/interface&gt;</pre>
&lt;/interface&gt;</pre>
</li>
<li>Generic connection to LAN
<p>Provides a means for the administrator to execute an arbitrary script
@ -1678,7 +1678,7 @@ source on Windows:
<ol>
<li>
<p>Run Cygwin
<p>Run Cygwin
<a href="http://www.cygwin.com/setup.exe">setup.exe</a>.
When it starts up it will show a dialog like this:
</p>
@ -3130,7 +3130,7 @@ daemon is to manage qemu instances.
</p>
<p>
The <code>libvirtd</code> daemon should be started by the
The <code>libvirtd</code> daemon should be started by the
init scripts when the machine boots. It should appear as
a process <code>libvirtd --daemon</code> running as root
in the background and will handle qemu instances on behalf

View File

@ -6,7 +6,7 @@
<ref name='domain'/>
</start>
<!--
<!--
We handle only document defining a domain
Currently the virtualization types supported are:
- xen, either paravirualized with a linux os or fully virtualized (hvm)
@ -166,7 +166,7 @@
</group>
</define>
<!--
<!--
The Identifiers can be:
- an optional id attribute with a number on the domain element
- a mandatory name
@ -371,7 +371,7 @@
</define>
<!--
Disk may use a special driver for access. Currently this is
Disk may use a special driver for access. Currently this is
only defined for Xen for tap/aio and file, but will certainly be
extended in the future, and libvirt doesn't look for specific values.
-->

View File

@ -492,7 +492,7 @@
<xsl:sort select='@symbol'/>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="file">
<xsl:variable name="name" select="@name"/>
<xsl:variable name="title">Module <xsl:value-of select="$name"/> from <xsl:value-of select="/api/@name"/></xsl:variable>

View File

@ -17,11 +17,11 @@ and check the <a href="ChangeLog.html">ChangeLog</a> to gauge progress.</p><h3>0
<li>Bug fixes: NUMA topology error handling (Beth Kon), NUMA topology
cells without CPU (Beth Kon), XML to/from XM bridge config (Daniel
Berrange), XM processing of vnc parameters (Daniel Berrange), Reset
migration source after failure (Jim Paris), negative integer in config
migration source after failure (Jim Paris), negative integer in config
(Tatsuro Enokura), zero terminating string buffer, detect integer
overflow (Jim Meyering), QEmu command line ending fixes (Daniel Berrange),
recursion problem in the daemon (Daniel Berrange), HVM domain with CDRom
(Masayuki Sunou), off by one error in NUMA cpu count (Beth Kon),
(Masayuki Sunou), off by one error in NUMA cpu count (Beth Kon),
avoid xend errors when adding disks (Masayuki Sunou), compile error
(Chris Lalancette), transposed fwrite args (Jim Meyering), compile
without xen and on solaris (Jim Paris), parsing of interface names
@ -45,10 +45,10 @@ and check the <a href="ChangeLog.html">ChangeLog</a> to gauge progress.</p><h3>0
&lt;shareable/&gt; in configs, pinning inactive domains for Xen 3.0.3
(Saori Fukuta), use gnulib for portability enhancement (Jim Meyering),
--without-libvirtd config option (Richard Jones), Python bindings for
NUMA, add extra utility functions to buffer (Richard Jones),
NUMA, add extra utility functions to buffer (Richard Jones),
separate qparams module for handling query parameters (Richard Jones)
</li>
<li>Code cleanups: remove virDomainRestart from API as it was never used
<li>Code cleanups: remove virDomainRestart from API as it was never used
(Richard Jones), constify params for attach/detach APIs (Daniel Berrange),
gcc printf attribute checkings (Jim Meyering), refactoring of device
parsing code and shell escaping (Daniel Berrange), virsh schedinfo
@ -78,7 +78,7 @@ and check the <a href="ChangeLog.html">ChangeLog</a> to gauge progress.</p><h3>0
missing buffer check in virDomainXMLDevID (Hugh Brock), avoid zombies
when using remote (Daniel Berrange), xend connection error message
(Richard Jones), avoid ssh tty prompt (Daniel Berrange), username
handling for remote URIs (Fabian Deutsch), fix potential crash
handling for remote URIs (Fabian Deutsch), fix potential crash
on multiple input XML tags (Daniel Berrange), Solaris Xen hypercalls
fixup (Mark Johnson)</li>
<li>Improvements: OpenVZ support (Shuveb Hussain and Anoop Cyriac),
@ -93,7 +93,7 @@ and check the <a href="ChangeLog.html">ChangeLog</a> to gauge progress.</p><h3>0
statistics</li>
<li>Code cleanups: virDrvOpenRemoteFlags definition (Richard Jones),
configure tests and output (Daniel Berrange)</li>
</ul><h3>0.3.2: Aug 21 2007</h3><ul><li>New features: KVM migration and save/restore (Jim Paris),
</ul><h3>0.3.2: Aug 21 2007</h3><ul><li>New features: KVM migration and save/restore (Jim Paris),
added API for migration (Richard Jones), added APIs for block device and
interface statistic (Richard Jones).</li>
<li>Documentation: examples for XML network APIs,
@ -149,8 +149,8 @@ and check the <a href="ChangeLog.html">ChangeLog</a> to gauge progress.</p><h3>0
the URI connection strings (Richard Jones), update of virsh man
page, matrix of libvirt API/hypervisor support with version
informations (Richard Jones)</li>
<li>Bug fixes: examples Makefile.am generation (Richard Jones),
SetMem fix (Mark Johnson), URI handling and ordering of
<li>Bug fixes: examples Makefile.am generation (Richard Jones),
SetMem fix (Mark Johnson), URI handling and ordering of
drivers (Daniel Berrange), fix virsh help without hypervisor (Richard
Jones), id marshalling fix (Daniel Berrange), fix virConnectGetMaxVcpus
on remote (Richard Jones), avoid a realloc leak (Jim Meyering), scheduler
@ -160,12 +160,12 @@ and check the <a href="ChangeLog.html">ChangeLog</a> to gauge progress.</p><h3>0
XML serialization bugs</li>
<li>Improvements: QEmu switch to XDR-based protocol (Dan Berrange),
device attach/detach commands (Masayuki Sunou), OCaml bindings
(Richard Jones), new entry points virDomainGetConnect and
virNetworkGetConnect useful for bindings (Richard Jones),
(Richard Jones), new entry points virDomainGetConnect and
virNetworkGetConnect useful for bindings (Richard Jones),
reunitifaction of remote and qemu daemon under a single libvirtd
with a config file (Daniel Berrange)</li>
<li>Cleanups: parsing of connection URIs (Richard Jones), messages
from virsh (Saori Fukuta), Coverage files (Daniel Berrange),
from virsh (Saori Fukuta), Coverage files (Daniel Berrange),
Solaris fixes (Mark Johnson), avoid [r]index calls (Richard Jones),
release information in Xen backend, virsh cpupin command cleanups
(Masayuki Sunou), xen:/// suppport as standard Xen URI (Richard Jones and
@ -194,7 +194,7 @@ and check the <a href="ChangeLog.html">ChangeLog</a> to gauge progress.</p><h3>0
QEmu memory bug (Daniel Berrange), memory leak fix (Masayuki Sunou),
fix compiler flags (Richard Jones), remove type ioemu on recent Xen
HVM for paravirt drivers (Saori Fukuta), uninitialized string bug
(Masayuki Sunou), allow init even if the daemon is not running,
(Masayuki Sunou), allow init even if the daemon is not running,
XML to config fix (Daniel Berrange)</li>
<li>Improvements: add a special error class for the test module (Richard
Jones), virConnectGetCapabilities on proxy (Richard Jones), allow
@ -213,10 +213,10 @@ and check the <a href="ChangeLog.html">ChangeLog</a> to gauge progress.</p><h3>0
Jones), export __virGetDomain and __virGetNetwork for libvirtd only
(Richard Jones), ignore old VNC config for HVM on recent Xen (Daniel
Berrange), various code cleanups, -Werror cleanup (Hugh Brock)</li>
</ul><h3>0.2.2: Apr 17 2007</h3><ul><li>Documentation: fix errors due to Amaya (with Simon Hernandez),
</ul><h3>0.2.2: Apr 17 2007</h3><ul><li>Documentation: fix errors due to Amaya (with Simon Hernandez),
virsh uses kB not bytes (Atsushi SAKAI), add command line help to
qemud (Richard Jones), xenUnifiedRegister docs (Atsushi SAKAI),
strings typos (Nikolay Sivov), ilocalization probalem raised by
strings typos (Nikolay Sivov), ilocalization probalem raised by
Thomas Canniot</li>
<li>Bug fixes: virsh memory values test (Masayuki Sunou), operations without
libvirt_qemud (Atsushi SAKAI), fix spec file (Florian La Roche, Jeremy
@ -228,14 +228,14 @@ and check the <a href="ChangeLog.html">ChangeLog</a> to gauge progress.</p><h3>0
Berrange), bridged config configuration (Daniel Berrange), erroneous
XEN_V2_OP_SETMAXMEM value (Masayuki Sunou), memory free error (Mark
McLoughlin), set VIR_CONNECT_RO on read-only connections (S.Sakamoto),
avoid memory explosion bug (Daniel Berrange), integer overflow
avoid memory explosion bug (Daniel Berrange), integer overflow
for qemu CPU time (Daniel Berrange), QEMU binary path check (Daniel
Berrange)</li>
<li>Cleanups: remove some global variables (Jim Meyering), printf-style
functions checks (Jim Meyering), better virsh error messages, increase
compiler checkings and security (Daniel Berrange), virBufferGrow usage
and docs, use calloc instead of malloc/memset, replace all sprintf by
snprintf, avoid configure clobbering user's CTAGS (Jim Meyering),
snprintf, avoid configure clobbering user's CTAGS (Jim Meyering),
signal handler error cleanup (Richard Jones), iptables internal code
claenup (Mark McLoughlin), unified Xen driver (Richard Jones),
cleanup XPath libxml2 calls, IPTables rules tightening (Daniel
@ -246,7 +246,7 @@ and check the <a href="ChangeLog.html">ChangeLog</a> to gauge progress.</p><h3>0
handling of CD-Rom device without device name (Nobuhiro Itou),
fix hypervisor call to work with Xen 3.0.5 (Daniel Berrange),
DomainGetOSType for inactive domains (Daniel Berrange), multiple boot
devices for HVM (Daniel Berrange),
devices for HVM (Daniel Berrange),
</li>
</ul><h3>0.2.1: Mar 16 2007</h3><ul><li>Various internal cleanups (Richard Jones,Daniel Berrange,Mark McLoughlin)</li>
<li>Bug fixes: libvirt_qemud daemon path (Daniel Berrange), libvirt
@ -267,7 +267,7 @@ and check the <a href="ChangeLog.html">ChangeLog</a> to gauge progress.</p><h3>0
Berrange), pointer/int mismatch (Richard Jones), configure time
selection of drivers, libvirt spec hacking (Daniel Berrange)</li>
<li>Add support for network autostart and init scripts (Mark McLoughlin)</li>
<li>New API virConnectGetCapabilities() to detect the virtualization
<li>New API virConnectGetCapabilities() to detect the virtualization
capabilities of a host (Richard Jones)</li>
<li>Minor improvements: qemud signal handling (Mark), don't shutdown or reboot
domain0 (Kazuki Mizushima), QEmu version autodetection (Daniel Berrange),
@ -283,7 +283,7 @@ and check the <a href="ChangeLog.html">ChangeLog</a> to gauge progress.</p><h3>0
parsing (Richard Jones)</li>
<li>Add support for QEmu and KVM virtualization (Daniel Berrange)</li>
<li>Add support for network configuration (Mark McLoughlin)</li>
<li>Minor improvements: regression testing (Daniel Berrange),
<li>Minor improvements: regression testing (Daniel Berrange),
localization string updates</li>
</ul><h3>0.1.11: Jan 22 2007</h3><ul><li>Finish XML &lt;-&gt; XM config files support</li>
<li>Remove memory leak when freeing virConf objects</li>

View File

@ -34,7 +34,7 @@
</xsl:template>
<xsl:template match="xhtml:a">
<xsl:value-of select="."/>
<xsl:text> at
<xsl:text> at
</xsl:text>
<xsl:value-of select="@href"/>
<xsl:text>

View File

@ -66,7 +66,7 @@
$result = mysql_query ("SELECT words.relevance, symbols.name, symbols.type, symbols.module, symbols.descr FROM words, symbols WHERE LCASE(words.name) LIKE LCASE('$word') and words.symbol = symbols.name ORDER BY words.relevance DESC LIMIT 75");
if ($result) {
$j = mysql_num_rows($result);
if ($j == 0)
if ($j == 0)
mysql_free_result($result);
}
logQueryWord($word);
@ -80,7 +80,7 @@
$result = mysql_query ("SELECT relevance, name, id, resource, section FROM wordsHTML WHERE LCASE(name) LIKE LCASE('$word') ORDER BY relevance DESC LIMIT 75");
if ($result) {
$j = mysql_num_rows($result);
if ($j == 0)
if ($j == 0)
mysql_free_result($result);
}
logQueryWord($word);
@ -94,7 +94,7 @@
$result = mysql_query ("SELECT wordsArchive.relevance, wordsArchive.name, 'libvir-list', archives.resource, archives.title FROM wordsArchive, archives WHERE LCASE(wordsArchive.name) LIKE LCASE('$word') and wordsArchive.ID = archives.ID ORDER BY relevance DESC LIMIT 75");
if ($result) {
$j = mysql_num_rows($result);
if ($j == 0)
if ($j == 0)
mysql_free_result($result);
}
logQueryWord($word);

View File

@ -263,7 +263,7 @@
</xsl:template>
<!--
- The top section
- The top section
-->
<xsl:template name="top">
<div id="top">
@ -286,7 +286,7 @@
<xsl:template name="bottom">
<div id="bottom">
<p class="p1"></p>
</div>
</div>
</xsl:template>
<!--

View File

@ -1,5 +1,5 @@
<node>
<!-- This file gives an example config for the mock 'test' backend
<!-- This file gives an example config for the mock 'test' backend
driver to libvirt. This is intended to allow relible unit testing
of applications using libvirt. To use this with virsh, run something
like:

View File

@ -51,7 +51,7 @@ To use QEMU support in libvirt you must be running the
in releases prior to 0.3.0). The purpose of this
daemon is to manage qemu instances.
</p><p>
The <code>libvirtd</code> daemon should be started by the
The <code>libvirtd</code> daemon should be started by the
init scripts when the machine boots. It should appear as
a process <code>libvirtd --daemon</code> running as root
in the background and will handle qemu instances on behalf

View File

@ -58,21 +58,21 @@ The following commands are generic i.e. not specific to a domain.
This prints a small synopsis about all commands available for B<virsh>
B<help> I<command> will print out a detailed help message on that command.
=item B<quit>
=item B<quit>
quit this interactive terminal
=item B<version>
=item B<version>
Will print out the major version info about what this built from.
Will print out the major version info about what this built from.
=over 4
B<Example>
B<Example>
B<virsh> version
B<virsh> version
Compiled against library: libvir 0.0.6
Compiled against library: libvir 0.0.6
Using library: libvir 0.0.6
@ -113,7 +113,7 @@ The I<--readonly> option allows for read-only connection
Returns basic information about the node, like number and type of CPU,
and size of the physical memory.
=item B<capabilities>
=item B<capabilities>
Print an XML document describing the capabilities of the hypervisor
we are currently connected to. This includes a section on the host
@ -123,7 +123,7 @@ description see:
L<http://libvirt.org/format.html#Capa1>
The XML also show the NUMA topology informations if available.
=item B<list>
=item B<list>
Prints information about one or more domains. If no domains are
specified it prints out information about all domains.
@ -131,20 +131,20 @@ specified it prints out information about all domains.
An example format for the list is as follows:
B<virsh> list
Id Name State
Id Name State
----------------------------------
----------------------------------
0 Domain-0 running
2 fedora paused
0 Domain-0 running
2 fedora paused
Name is the name of the domain. ID the domain numeric id.
State is the run state (see below).
Name is the name of the domain. ID the domain numeric id.
State is the run state (see below).
=item B<freecell> optional I<cellno>
Prints the available amount of memory on the machine or within a
Prints the available amount of memory on the machine or within a
NUMA cell if I<cellno> is provided.
=over 4
@ -175,7 +175,7 @@ scheduling by the Xen hypervisor.
=item B<s - shutdown>
The domain is in the process of shutting down, i.e. the guest operating system
has been notified and should be in the process of stopping its operations
has been notified and should be in the process of stopping its operations
gracefully.
=item B<c - crashed>
@ -209,13 +209,13 @@ The option I<--disable> disable autostarting.
Connect the virtual serial console for the guest.
=item B<create> I<FILE>
=item B<create> I<FILE>
Create a domain from an XML <file> an easy way to create one if you have a pre-existing xen guest created via B<xm> create <XMLFILE>.
Create a domain from an XML <file> an easy way to create one if you have a pre-existing xen guest created via B<xm> create <XMLFILE>.
B<Example>
virsh dumpxml <domain-id> > file.
virsh dumpxml <domain-id> > file.
=item B<define> I<FILE>
@ -229,7 +229,7 @@ OS any chance to react, and it the equivalent of ripping the power
cord out on a physical machine. In most cases you will want to use
the B<shutdown> command instead.
=item B<dominfo> I<domain-id>
=item B<dominfo> I<domain-id>
Returns basic information about the domain.
@ -255,7 +255,7 @@ Returns state about a running domain.
=item B<dumpxml> I<domain-id>
Output the domain informations as an XML dump to stdout, this format can be used by the B<create> command.
Output the domain informations as an XML dump to stdout, this format can be used by the B<create> command.
=item B<reboot> I<domain-id>
@ -296,13 +296,13 @@ domain is paravirtualized or running the PV balloon driver.
=item B<setmaxmem> I<domain-id> B<kilobytes>
Change the maximum memory allocation limit in the guest domain. This should
not change the current memory use. The memory limit is specified in
not change the current memory use. The memory limit is specified in
kilobytes.
=item B<setvcpus> I<domain-id> I<count>
Change the number of virtual CPUs active in the guest domain. Note that
I<count> may be limited by host, hypervisor or limit coming from the
I<count> may be limited by host, hypervisor or limit coming from the
original description of domain.
For Xen, you can only adjust the virtual CPUs of a running domain if
@ -313,7 +313,7 @@ the domain is paravirtualized.
Gracefully shuts down a domain. This coordinates with the domain OS
to perform graceful shutdown, so there is no guarantee that it will
succeed, and may take a variable length of time depending on what
services must be shutdown in the domain.
services must be shutdown in the domain.
For a xen guest vm the behavior of what happens to a domain when it reboots is set by the
I<on_shutdown> parameter of the xmdomain.cfg file when the domain was
@ -428,7 +428,7 @@ The I<--disable> option disable autostarting.
=item B<net-create> I<file>
Create a virtual network from an XML I<file>, see the documentation to get
a description of the XML network format used by libvirt.
a description of the XML network format used by libvirt.
=item B<net-define> I<file>
@ -485,19 +485,19 @@ L<xm(1)>, L<xmdomain.cfg(5)>, L<xentop(1)> , L<http://www.libvirt.org/>
=head1 AUTHOR
Andrew Puch <apuch @ redhat.com>
Andrew Puch <apuch @ redhat.com>
Daniel Veillard <veillard @ redhat.com>
Based on the xm man paged by
Based on the xm man paged by
Sean Dague <sean at dague dot net>
Daniel Stekloff <dsteklof at us dot ibm dot com>
=head1 BUGS
Bugs can be view on the RedHat buzilla page under the libvirt
Bugs can be view on the RedHat buzilla page under the libvirt
L<https://bugzilla.redhat.com/>
L<https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr>
=end

View File

@ -48,7 +48,7 @@ latest version from CVS</a> </li>
These are the steps to take to compile libvirt from
source on Windows:
</p><ol><li>
<p>Run Cygwin
<p>Run Cygwin
<a href="http://www.cygwin.com/setup.exe">setup.exe</a>.
When it starts up it will show a dialog like this:
</p>

View File

@ -106,7 +106,7 @@ typedef enum {
* virNodeInfoPtr:
*
* a virNodeInfo is a structure filled by virNodeGetInfo() and providing
* the informations for the Node.
* the informations for the Node.
*/
typedef struct _virNodeInfo virNodeInfo;
@ -319,7 +319,7 @@ typedef virConnectCredential *virConnectCredentialPtr;
* @param cred list of virConnectCredential object to fetch from user
* @param ncred size of cred list
* @param cbdata opaque data passed to virConnectOpenAuth
*
*
* When authentication requires one or more interactions, this callback
* is invoked. For each interaction supplied, data must be gathered
* from the user and filled in to the 'result' and 'resultlen' fields.
@ -368,7 +368,7 @@ extern virConnectAuthPtr virConnectAuthPtrDefault;
/**
* LIBVIR_VERSION_NUMBER:
*
* Macro providing the version of the library as
* Macro providing the version of the library as
* version * 1,000,000 + minor * 1000 + micro
*/
@ -473,7 +473,7 @@ int virDomainCoreDump (virDomainPtr domain,
*/
int virDomainGetInfo (virDomainPtr domain,
virDomainInfoPtr info);
/*
* Return scheduler type in effect 'sedf', 'credit', 'linux'
*/
@ -487,7 +487,7 @@ const char * virDomainGetName (virDomainPtr domain);
unsigned int virDomainGetID (virDomainPtr domain);
int virDomainGetUUID (virDomainPtr domain,
unsigned char *uuid);
int virDomainGetUUIDString (virDomainPtr domain,
int virDomainGetUUIDString (virDomainPtr domain,
char *buf);
char * virDomainGetOSType (virDomainPtr domain);
unsigned long virDomainGetMaxMemory (virDomainPtr domain);

View File

@ -106,7 +106,7 @@ typedef enum {
* virNodeInfoPtr:
*
* a virNodeInfo is a structure filled by virNodeGetInfo() and providing
* the informations for the Node.
* the informations for the Node.
*/
typedef struct _virNodeInfo virNodeInfo;
@ -319,7 +319,7 @@ typedef virConnectCredential *virConnectCredentialPtr;
* @param cred list of virConnectCredential object to fetch from user
* @param ncred size of cred list
* @param cbdata opaque data passed to virConnectOpenAuth
*
*
* When authentication requires one or more interactions, this callback
* is invoked. For each interaction supplied, data must be gathered
* from the user and filled in to the 'result' and 'resultlen' fields.
@ -368,7 +368,7 @@ extern virConnectAuthPtr virConnectAuthPtrDefault;
/**
* LIBVIR_VERSION_NUMBER:
*
* Macro providing the version of the library as
* Macro providing the version of the library as
* version * 1,000,000 + minor * 1000 + micro
*/
@ -473,7 +473,7 @@ int virDomainCoreDump (virDomainPtr domain,
*/
int virDomainGetInfo (virDomainPtr domain,
virDomainInfoPtr info);
/*
* Return scheduler type in effect 'sedf', 'credit', 'linux'
*/
@ -487,7 +487,7 @@ const char * virDomainGetName (virDomainPtr domain);
unsigned int virDomainGetID (virDomainPtr domain);
int virDomainGetUUID (virDomainPtr domain,
unsigned char *uuid);
int virDomainGetUUIDString (virDomainPtr domain,
int virDomainGetUUIDString (virDomainPtr domain,
char *buf);
char * virDomainGetOSType (virDomainPtr domain);
unsigned long virDomainGetMaxMemory (virDomainPtr domain);

View File

@ -75,7 +75,7 @@ Obsoletes: libvir-python
%description python
The libvirt-python package contains a module that permits applications
written in the Python programming language to use the interface
supplied by the libvirt library to use the virtualization capabilities
supplied by the libvirt library to use the virtualization capabilities
of recent versions of Linux (and other OSes).
%prep
@ -348,7 +348,7 @@ fi
- add patch to address dom0_ops API breakage in Xen 3.0.3 tree
* Mon Aug 28 2006 Jeremy Katz <katzj@redhat.com> - 0.1.4-4
- add patch to support paravirt framebuffer in Xen
- add patch to support paravirt framebuffer in Xen
* Mon Aug 21 2006 Daniel Veillard <veillard@redhat.com> 0.1.4-3
- another patch to fix network handling in non-HVM guests
@ -421,7 +421,7 @@ fi
- fixes some problems in 0.0.3 due to the change of names
* Wed Feb 8 2006 Daniel Veillard <veillard@redhat.com> 0.0.3-1
- changed library name to libvirt from libvir, complete and test the python
- changed library name to libvirt from libvir, complete and test the python
bindings
* Sun Jan 29 2006 Daniel Veillard <veillard@redhat.com> 0.0.2-1

View File

@ -1,4 +1,4 @@
# translation of ru.po to
# translation of ru.po to
# translation of ru.po to
# translation of ru.po to
# translation of ru.po to

View File

@ -1,9 +1,9 @@
# Swedish translation of libvirt.
# Copyright (C) 2006 Free Software Foundation, Inc.
# Magnus Larsson <fedoratrans@gmail.com>, 2006, 2007.
#
#
#
#
#
#
msgid ""
msgstr ""
"Project-Id-Version: libvirt\n"

View File

@ -134,7 +134,7 @@ proxyCloseUnixSocket(void) {
if (fdServer < 0)
return(0);
ret = close(fdServer);
if (debug > 0)
fprintf(stderr, "closing unix socket %d: %d\n", fdServer, ret);
@ -166,7 +166,7 @@ proxyListenUnixSocket(const char *path) {
}
/*
* Abstract socket do not hit the filesystem, way more secure and
* Abstract socket do not hit the filesystem, way more secure and
* garanteed to be atomic
*/
memset(&addr, 0, sizeof(addr));
@ -348,7 +348,7 @@ retry:
if (debug)
fprintf(stderr, "wrote %d bytes to client %d on socket %d\n",
ret, nr, pollInfos[nr].fd);
return(0);
}
/**
@ -389,13 +389,13 @@ retry:
if (debug)
fprintf(stderr, "read %d bytes from client %d on socket %d\n",
ret, nr, pollInfos[nr].fd);
if ((req->version != PROXY_PROTO_VERSION) ||
(req->len < sizeof(virProxyPacket)) ||
(req->len > sizeof(virProxyFullPacket)))
goto comm_error;
if (debug)
fprintf(stderr, "Got command %d from client %d\n", req->command, nr);
@ -683,7 +683,7 @@ comm_error:
/**
* proxyProcessRequests:
*
* process requests and timers
* process requests and timers
*/
static void
proxyProcessRequests(void) {
@ -745,7 +745,7 @@ proxyProcessRequests(void) {
proxyCloseClientSocket(i);
}
}
}
}
@ -756,7 +756,7 @@ proxyProcessRequests(void) {
* open, serve client requests, and process timing events.
*/
static void
static void
proxyMainLoop(void) {
while (! done) {
if (proxyListenUnixSocket(PROXY_SOCKET_PATH) < 0)

View File

@ -69,7 +69,7 @@ uninstall-local:
CLEANFILES= $(GENERATED) libvirt.py
else
all:
all:
endif
dummy:

View File

@ -186,8 +186,8 @@ class docParser:
str = str + c
if self.in_function == 1:
self.function_cond = str
def function(name, desc, ret, args, file, cond):
functions[name] = (desc, ret, args, file, cond)
@ -750,7 +750,7 @@ def buildWrappers():
if not classes_processed.has_key(tinfo[2]):
classes_list.append(tinfo[2])
classes_processed[tinfo[2]] = ()
ctypes.append(type)
ctypes_processed[type] = ()
@ -776,7 +776,7 @@ def buildWrappers():
func = nameFixup(name, "None", file, file)
info = (0, func, name, ret, args, file)
function_classes['None'].append(info)
classes = open("libvirtclass.py", "w")
txt = open("libvirtclass.txt", "w")

View File

@ -751,7 +751,7 @@ libvirt_virConnectListDefinedDomains(PyObject *self ATTRIBUTE_UNUSED,
c_retval = virConnectNumOfDefinedDomains(conn);
if (c_retval < 0)
return VIR_PY_NONE;
if (c_retval) {
names = malloc(sizeof(*names) * c_retval);
if (!names)
@ -939,7 +939,7 @@ libvirt_virConnectListDefinedNetworks(PyObject *self ATTRIBUTE_UNUSED,
c_retval = virConnectNumOfDefinedNetworks(conn);
if (c_retval < 0)
return VIR_PY_NONE;
if (c_retval) {
names = malloc(sizeof(*names) * c_retval);
if (!names)
@ -1090,7 +1090,7 @@ error:
}
py_retval = PyList_New(c_retval);
for (i = 0;i < c_retval;i++) {
PyList_SetItem(py_retval, i,
PyList_SetItem(py_retval, i,
libvirt_longlongWrap((long long) freeMems[i]));
}
free(freeMems);

View File

@ -129,7 +129,7 @@ while i < 30:
okay = 0
t = -1
break;
if t == 0:
break

View File

@ -36,6 +36,6 @@ except:
if dom2.name() != name0:
print 'lookup of %s based on UUID brings a different domain %s' % (
name0, dom2.name())
print "OK"
sys.exit(0)

View File

@ -45,7 +45,7 @@ libvirt_ulongWrap(unsigned long val)
#endif
ret = PyLong_FromLong(val);
return (ret);
}
}
PyObject *
libvirt_longlongWrap(long long val)

View File

@ -1,5 +1,5 @@
# If you want to use the non-TLS socket, then you *must* include
# the GSSAPI or DIGEST-MD5 mechanisms, because they are the only
# the GSSAPI or DIGEST-MD5 mechanisms, because they are the only
# ones that can offer session encryption as well as authentication.
#
# If you're only using TLS, then you can turn on any mechanisms

View File

@ -155,10 +155,10 @@ static void libvirtd_mdns_create_services(struct libvirtd_mdns_group *group) {
group->name,
entry->type,
NULL,
NULL,
NULL,
entry->port,
NULL)) < 0) {
AVAHI_DEBUG("Failed to add %s service on port %d: %s",
AVAHI_DEBUG("Failed to add %s service on port %d: %s",
entry->type, entry->port, avahi_strerror(ret));
avahi_entry_group_reset(group->handle);
return;

View File

@ -38,7 +38,7 @@ struct libvirtd_mdns *libvirtd_mdns_new(void);
/**
* Starts the mdns client, advertizing any groups/entries currently registered
*
*
* @mdns: manager to start advertizing
*
* Starts the mdns client. Services may not be immediately visible, since

View File

@ -243,7 +243,7 @@ brAddDelInterface(brControl *ctl,
* @ctl: bridge control pointer
* @bridge: the bridge name
* @iface: the network interface name
*
*
* Adds an interface to a bridge
*
* Returns 0 in case of success or an errno code in case of failure.
@ -271,7 +271,7 @@ brAddInterface(brControl *ctl ATTRIBUTE_UNUSED,
* @ctl: bridge control pointer
* @bridge: the bridge name
* @iface: the network interface name
*
*
* Removes an interface from a bridge
*
* Returns 0 in case of success or an errno code in case of failure.
@ -662,7 +662,7 @@ brctlSpawn(char * const *argv)
*
* Returns 0 in case of success or an errno code in case of failure.
*/
int
brSetForwardDelay(brControl *ctl ATTRIBUTE_UNUSED,
const char *bridge,

View File

@ -167,7 +167,7 @@ char *
virBufferContentAndFree (virBufferPtr buf)
{
char *content;
if (buf == NULL)
return(NULL);

View File

@ -201,7 +201,7 @@ virConfAddEntry(virConfPtr conf, char *name, virConfValuePtr value, char *comm)
return(NULL);
if ((comm == NULL) && (name == NULL))
return(NULL);
ret = calloc(1, sizeof(*ret));
if (ret == NULL) {
virConfError(NULL, VIR_ERR_NO_MEMORY, _("allocating configuration"), 0);
@ -790,7 +790,7 @@ __virConfFree(virConfPtr conf)
*
* Lookup the value associated to this entry in the configuration file
*
* Returns a pointer to the value or NULL if the lookup failed, the data
* Returns a pointer to the value or NULL if the lookup failed, the data
* associated will be freed when virConfFree() is called
*/
virConfValuePtr
@ -896,7 +896,7 @@ __virConfWriteFile(const char *filename, virConfPtr conf)
virConfSaveEntry(buf, cur);
cur = cur->next;
}
fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR );
if (fd < 0) {
virConfError(NULL, VIR_ERR_WRITE_FAILED, _("failed to open file"), 0);
@ -950,7 +950,7 @@ __virConfWriteMem(char *memory, int *len, virConfPtr conf)
virConfSaveEntry(buf, cur);
cur = cur->next;
}
if ((int) buf->use >= *len) {
*len = buf->use;
ret = -1;

View File

@ -1,5 +1,5 @@
/*
* driver.h: description of the set of interfaces provided by a
* driver.h: description of the set of interfaces provided by a
* entry point to the virtualization engine
*/
@ -197,7 +197,7 @@ typedef char *
(*virDrvDomainGetSchedulerType) (virDomainPtr domain,
int *nparams);
typedef int
typedef int
(*virDrvDomainGetSchedulerParameters)
(virDomainPtr domain,
virSchedParameterPtr params,

View File

@ -145,7 +145,7 @@ virHashGrow(virHashTablePtr table, int size)
table->size = size;
/* If the two loops are merged, there would be situations where
* a new entry needs to allocated and data copied into it from
* a new entry needs to allocated and data copied into it from
* the main table. So instead, we run through the array twice, first
* copying all the elements in the main array (where we can't get
* conflicts) and then the rest, so we only free (and don't allocate)

View File

@ -737,7 +737,7 @@ iptablesForwardAllowOut(iptablesContext *ctx,
* @network: the source network name
* @iface: the source interface name
* @physdev: the physical output device
*
*
* Add a rule to the IP table context to allow the traffic for the
* network @network via interface @iface to be forwarded to
* @physdev device. This allow the outbound traffic on a bridge.
@ -759,7 +759,7 @@ iptablesAddForwardAllowOut(iptablesContext *ctx,
* @network: the source network name
* @iface: the source interface name
* @physdev: the physical output device
*
*
* Remove a rule from the IP table context hence forbidding forwarding
* of the traffic for the network @network via interface @iface
* to the @physdev device output. This stops the outbound traffic on a bridge.
@ -814,7 +814,7 @@ iptablesForwardAllowIn(iptablesContext *ctx,
* @network: the source network name
* @iface: the output interface name
* @physdev: the physical input device or NULL
*
*
* Add rules to the IP table context to allow the traffic for the
* network @network on @physdev device to be forwarded to
* interface @iface. This allow the inbound traffic on a bridge.
@ -836,7 +836,7 @@ iptablesAddForwardAllowIn(iptablesContext *ctx,
* @network: the source network name
* @iface: the output interface name
* @physdev: the physical input device or NULL
*
*
* Remove rules from the IP table context hence forbidding the traffic for
* network @network on @physdev device to be forwarded to
* interface @iface. This stops the inbound traffic on a bridge.
@ -1036,7 +1036,7 @@ iptablesForwardMasquerade(iptablesContext *ctx,
* @ctx: pointer to the IP table context
* @network: the source network name
* @physdev: the physical input device or NULL
*
*
* Add rules to the IP table context to allow masquerading
* network @network on @physdev. This allow the bridge to
* masquerade for that network (on @physdev).
@ -1056,7 +1056,7 @@ iptablesAddForwardMasquerade(iptablesContext *ctx,
* @ctx: pointer to the IP table context
* @network: the source network name
* @physdev: the physical input device or NULL
*
*
* Remove rules from the IP table context to stop masquerading
* network @network on @physdev. This stops the bridge from
* masquerading for that network (on @physdev).

View File

@ -204,7 +204,7 @@ virInitialize(void)
#ifdef WITH_TEST
if (testRegister() == -1) return -1;
#endif
#ifdef WITH_QEMU
#ifdef WITH_QEMU
if (qemudRegister() == -1) return -1;
#endif
#ifdef WITH_XEN
@ -468,7 +468,7 @@ int __virStateActive(void) {
* Provides two information back, @libVer is the version of the library
* while @typeVer will be the version of the hypervisor type @type against
* which the library was compiled. If @type is NULL, "Xen" is assumed, if
* @type is unknown or not availble, an error code will be returned and
* @type is unknown or not availble, an error code will be returned and
* @typeVer will be 0.
*
* Returns -1 in case of failure, 0 otherwise, and values for @libVer and
@ -597,7 +597,7 @@ do_open (const char *name,
(res == VIR_DRV_OPEN_ERROR ? "ERROR" : "unknown status")));
if (res == VIR_DRV_OPEN_ERROR) {
if (STREQ(virNetworkDriverTab[i]->name, "remote")) {
virLibConnWarning (NULL, VIR_WAR_NO_NETWORK,
virLibConnWarning (NULL, VIR_WAR_NO_NETWORK,
"Is the daemon running ?");
}
break;
@ -625,7 +625,7 @@ failed:
* virConnectOpen:
* @name: URI of the hypervisor
*
* This function should be called first to get a connection to the
* This function should be called first to get a connection to the
* Hypervisor and xen store
*
* Returns a pointer to the hypervisor connection or NULL in case of error
@ -643,7 +643,7 @@ virConnectOpen (const char *name)
* virConnectOpenReadOnly:
* @name: URI of the hypervisor
*
* This function should be called first to get a restricted connection to the
* This function should be called first to get a restricted connection to the
* libbrary functionalities. The set of APIs usable are then restricted
* on the available methods to control the domains.
*
@ -664,7 +664,7 @@ virConnectOpenReadOnly(const char *name)
* @auth: Authenticate callback parameters
* @flags: Open flags
*
* This function should be called first to get a connection to the
* This function should be called first to get a connection to the
* Hypervisor. If neccessary, authentication will be performed fetching
* credentials via the callback
*
@ -757,7 +757,7 @@ virConnectGetType(virConnectPtr conn)
* @conn: pointer to the hypervisor connection
* @hvVer: return value for the version of the running hypervisor (OUT)
*
* Get the version level of the Hypervisor running. This may work only with
* Get the version level of the Hypervisor running. This may work only with
* hypervisor call, i.e. with priviledged access to the hypervisor, not
* with a Read-Only connection.
*
@ -978,7 +978,7 @@ virDomainGetConnect (virDomainPtr dom)
* Launch a new Linux guest domain, based on an XML description similar
* to the one returned by virDomainGetXMLDesc()
* This function may requires priviledged access to the hypervisor.
*
*
* Returns a new domain object or NULL in case of failure
*/
virDomainPtr
@ -1096,10 +1096,10 @@ virDomainLookupByUUIDString(virConnectPtr conn, const char *uuidstr)
if (uuidstr == NULL) {
virLibConnError(conn, VIR_ERR_INVALID_ARG, __FUNCTION__);
return (NULL);
}
/* XXX: sexpr_uuid() also supports 'xxxx-xxxx-xxxx-xxxx' format.
* We needn't it here. Right?
/* XXX: sexpr_uuid() also supports 'xxxx-xxxx-xxxx-xxxx' format.
* We needn't it here. Right?
*/
ret = sscanf(uuidstr,
"%02x%02x%02x%02x-"
@ -1111,14 +1111,14 @@ virDomainLookupByUUIDString(virConnectPtr conn, const char *uuidstr)
raw + 4, raw + 5, raw + 6, raw + 7,
raw + 8, raw + 9, raw + 10, raw + 11,
raw + 12, raw + 13, raw + 14, raw + 15);
if (ret!=VIR_UUID_BUFLEN) {
virLibConnError(conn, VIR_ERR_INVALID_ARG, __FUNCTION__);
return (NULL);
}
for (i = 0; i < VIR_UUID_BUFLEN; i++)
uuid[i] = raw[i] & 0xFF;
return virDomainLookupByUUID(conn, &uuid[0]);
}
@ -1218,7 +1218,7 @@ virDomainFree(virDomainPtr domain)
* @domain: a domain object
*
* Suspends an active domain, the process is frozen without further access
* to CPU resources and I/O but the memory used by the domain at the
* to CPU resources and I/O but the memory used by the domain at the
* hypervisor level will stay allocated. Use virDomainResume() to reactivate
* the domain.
* This function may requires priviledged access.
@ -1346,7 +1346,7 @@ virDomainSave(virDomainPtr domain, const char *to)
/**
* virDomainRestore:
* @conn: pointer to the hypervisor connection
* @from: path to the
* @from: path to the
*
* This method will restore a domain saved to disk by virDomainSave().
*
@ -1586,7 +1586,7 @@ virDomainGetUUID(virDomainPtr domain, unsigned char *uuid)
* @domain: a domain object
* @buf: pointer to a VIR_UUID_STRING_BUFLEN bytes array
*
* Get the UUID for a domain as string. For more information about
* Get the UUID for a domain as string. For more information about
* UUID see RFC4122.
*
* Returns -1 in case of error, 0 in case of success
@ -1605,7 +1605,7 @@ virDomainGetUUIDString(virDomainPtr domain, char *buf)
virLibDomainError(domain, VIR_ERR_INVALID_ARG, __FUNCTION__);
return (-1);
}
if (virDomainGetUUID(domain, &uuid[0]))
return (-1);
@ -1665,7 +1665,7 @@ virDomainGetOSType(virDomainPtr domain)
/**
* virDomainGetMaxMemory:
* @domain: a domain object or NULL
*
*
* Retrieve the maximum amount of physical memory allocated to a
* domain. If domain is NULL, then this get the amount of memory reserved
* to Domain0 i.e. the domain where the application runs.
@ -1696,7 +1696,7 @@ virDomainGetMaxMemory(virDomainPtr domain)
* virDomainSetMaxMemory:
* @domain: a domain object or NULL
* @memory: the memory size in kilobytes
*
*
* Dynamically change the maximum amount of physical memory allocated to a
* domain. If domain is NULL, then this change the amount of memory reserved
* to Domain0 i.e. the domain where the application runs.
@ -1739,7 +1739,7 @@ virDomainSetMaxMemory(virDomainPtr domain, unsigned long memory)
* virDomainSetMemory:
* @domain: a domain object or NULL
* @memory: the memory size in kilobytes
*
*
* Dynamically change the target amount of physical memory allocated to a
* domain. If domain is NULL, then this change the amount of memory reserved
* to Domain0 i.e. the domain where the application runs.
@ -1783,7 +1783,7 @@ virDomainSetMemory(virDomainPtr domain, unsigned long memory)
* virDomainGetInfo:
* @domain: a domain object
* @info: pointer to a virDomainInfo structure allocated by the user
*
*
* Extract information about a domain. Note that if the connection
* used to get the domain is limited only a partial set of the information
* can be extracted.
@ -2069,7 +2069,7 @@ __virDomainMigrateFinish (virConnectPtr dconn,
* virNodeGetInfo:
* @conn: pointer to the hypervisor connection
* @info: pointer to a virNodeInfo structure allocated by the user
*
*
* Extract hardware information about the node.
*
* Returns 0 in case of success and -1 in case of failure.
@ -2125,7 +2125,7 @@ virConnectGetCapabilities (virConnectPtr conn)
/**
* virNodeGetFreeMemory:
* @conn: pointer to the hypervisor connection
*
*
* provides the free memory availble on the Node
*
* Returns the available free memory in kilobytes or 0 in case of error
@ -2226,7 +2226,7 @@ virDomainGetSchedulerParameters(virDomainPtr domain,
* Returns -1 in case of error, 0 in case of success.
*/
int
virDomainSetSchedulerParameters(virDomainPtr domain,
virDomainSetSchedulerParameters(virDomainPtr domain,
virSchedParameterPtr params, int nparams)
{
virConnectPtr conn;
@ -2455,7 +2455,7 @@ virConnectNumOfDefinedDomains(virConnectPtr conn)
* @maxnames: size of the array
*
* list the defined domains, stores the pointers to the names in @names
*
*
* Returns the number of names provided in the array or -1 in case of error
*/
int
@ -2639,7 +2639,7 @@ virDomainSetVcpus(virDomainPtr domain, unsigned int nvcpus)
* underlying virtualization system (Xen...).
* If maplen < size, missing bytes are set to zero.
* If maplen > size, failure code is returned.
*
*
* Dynamically change the real CPUs which can be allocated to a virtual CPU.
* This function requires priviledged access to the hypervisor.
*
@ -2694,7 +2694,7 @@ virDomainPinVcpu(virDomainPtr domain, unsigned int vcpu,
* virDomainPinVcpu() API.
* @maplen: number of bytes in one cpumap, from 1 up to size of CPU map in
* underlying virtualization system (Xen...).
*
*
* Extract information about virtual CPUs of domain, store it in info array
* and also in cpumaps if this pointer is'nt NULL.
*
@ -2737,7 +2737,7 @@ virDomainGetVcpus(virDomainPtr domain, virVcpuInfoPtr info, int maxinfo,
/**
* virDomainGetMaxVcpus:
* @domain: pointer to domain object
*
*
* Provides the maximum number of virtual CPUs supported for
* the guest VM. If the guest is inactive, this is basically
* the same as virConnectGetMaxVcpus. If the guest is running
@ -2771,7 +2771,7 @@ virDomainGetMaxVcpus(virDomainPtr domain)
* virDomainAttachDevice:
* @domain: pointer to domain object
* @xml: pointer to XML description of one device
*
*
* Create a virtual device attachment to backend.
*
* Returns 0 in case of success, -1 in case of failure.
@ -2803,7 +2803,7 @@ virDomainAttachDevice(virDomainPtr domain, const char *xml)
* virDomainDetachDevice:
* @domain: pointer to domain object
* @xml: pointer to XML description of one device
*
*
* Destroy a virtual device attachment to backend.
*
* Returns 0 in case of success, -1 in case of failure.

View File

@ -19,7 +19,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Authors:
* Authors:
* Shuveb Hussain <shuveb@binarykarma.com>
* Anoop Joe Cyriac <anoop@binarykarma.com>
*
@ -74,7 +74,7 @@ error (virConnectPtr conn, virErrorNumber code, const char *info)
errmsg, info);
}
struct openvz_vm
struct openvz_vm
*openvzFindVMByID(const struct openvz_driver *driver, int id) {
struct openvz_vm *vm = driver->vms;
@ -87,7 +87,7 @@ struct openvz_vm
return NULL;
}
struct openvz_vm
struct openvz_vm
*openvzFindVMByUUID(const struct openvz_driver *driver,
const unsigned char *uuid) {
struct openvz_vm *vm = driver->vms;
@ -101,7 +101,7 @@ struct openvz_vm
return NULL;
}
struct openvz_vm
struct openvz_vm
*openvzFindVMByName(const struct openvz_driver *driver,
const char *name) {
struct openvz_vm *vm = driver->vms;
@ -126,7 +126,7 @@ strtoI(const char *str)
/* Check for various possible errors */
if ((endptr == str) /* "No digits were found" */
||((*endptr != '\0')
||((*endptr != '\0')
&& (*endptr != ' ')) /*"Name contain characters other than integers" */ )
return 0;
return val;
@ -172,7 +172,7 @@ openvzFreeVMDef(struct openvz_vm_def *def)
}
}
/* Free all memory associated with a openvz_vm structure
/* Free all memory associated with a openvz_vm structure
* @checkCallee == 0 then openvzFreeDriver() is callee else some other function
*/
void
@ -237,7 +237,7 @@ openvzAssignVMDef(virConnectPtr conn,
}
else
{
openvzLog(OPENVZ_ERR, "Error already an active OPENVZ VM having id '%s'",
openvzLog(OPENVZ_ERR, "Error already an active OPENVZ VM having id '%s'",
def->name);
openvzFreeVMDef(def);
return NULL; /* can't redefine an active domain */
@ -247,7 +247,7 @@ openvzAssignVMDef(virConnectPtr conn,
}
if (!(vm = calloc(1, sizeof(*vm)))) {
openvzFreeVMDef(def);
openvzFreeVMDef(def);
error(conn, VIR_ERR_NO_MEMORY, "vm");
return NULL;
}
@ -263,14 +263,14 @@ openvzAssignVMDef(virConnectPtr conn,
return vm;
}
struct openvz_vm_def
struct openvz_vm_def
*openvzParseVMDef(virConnectPtr conn,
const char *xmlStr, const char *displayName)
{
xmlDocPtr xml;
struct openvz_vm_def *def = NULL;
xml = xmlReadDoc(BAD_CAST xmlStr, displayName ? displayName : "domain.xml", NULL,
xml = xmlReadDoc(BAD_CAST xmlStr, displayName ? displayName : "domain.xml", NULL,
XML_PARSE_NOENT | XML_PARSE_NONET | XML_PARSE_NOERROR | XML_PARSE_NOWARNING);
if (!xml) {
error(conn, VIR_ERR_XML_ERROR, NULL);
@ -287,7 +287,7 @@ struct openvz_vm_def
* Parses a libvirt XML definition of a guest, and populates the
* the openvz_vm struct with matching data about the guests config
*/
static struct openvz_vm_def
static struct openvz_vm_def
*openvzParseXML(virConnectPtr conn,
xmlDocPtr xml) {
xmlNodePtr root = NULL;
@ -337,10 +337,10 @@ static struct openvz_vm_def
error(conn, VIR_ERR_INTERNAL_ERROR,"invalid domain name");
goto bail_out;
}
/* rejecting VPS ID <= OPENVZ_RSRV_VM_LIMIT for they are reserved */
if (strtoI((const char *) obj->stringval) <= OPENVZ_RSRV_VM_LIMIT) {
error(conn, VIR_ERR_INTERNAL_ERROR,
error(conn, VIR_ERR_INTERNAL_ERROR,
"VPS ID Error (must be an integer greater than 100");
goto bail_out;
}
@ -365,7 +365,7 @@ static struct openvz_vm_def
/* Extract filesystem info */
obj = xmlXPathEval(BAD_CAST "string(/domain/container/filesystem/template[1])", ctxt);
if ((obj == NULL) || (obj->type != XPATH_STRING) || (obj->stringval == NULL)
if ((obj == NULL) || (obj->type != XPATH_STRING) || (obj->stringval == NULL)
|| (obj->stringval[0] == 0)) {
error(conn, VIR_ERR_OS_TYPE, NULL);
goto bail_out;
@ -381,9 +381,9 @@ static struct openvz_vm_def
/* Extract network */
/* Extract ipaddress */
obj = xmlXPathEval(BAD_CAST"string(/domain/container/network/ipaddress[1])", ctxt);
if ((obj == NULL) || (obj->type != XPATH_STRING) || (obj->stringval == NULL)
if ((obj == NULL) || (obj->type != XPATH_STRING) || (obj->stringval == NULL)
|| (obj->stringval[0] == 0)) {
openvzLog(OPENVZ_WARN, "No IP address in the given xml config file '%s'",
openvzLog(OPENVZ_WARN, "No IP address in the given xml config file '%s'",
xml->name);
}
if (xmlStrlen(obj->stringval) >= (OPENVZ_IP_MAX)) {
@ -405,9 +405,9 @@ static struct openvz_vm_def
obj = xmlXPathEval(BAD_CAST "string(/domain/container/network/netmask[1])", ctxt);
if ((obj == NULL) || (obj->type != XPATH_STRING)
|| (obj->stringval == NULL) || (obj->stringval[0] == 0))
openvzLog(OPENVZ_WARN, "No Netmask address in the given xml config file '%s'",
openvzLog(OPENVZ_WARN, "No Netmask address in the given xml config file '%s'",
xml->name);
if (strlen((const char *) obj->stringval) >= (OPENVZ_IP_MAX)) {
char errorMessage[OPENVZ_MAX_ERROR_LEN];
@ -420,10 +420,10 @@ static struct openvz_vm_def
/* Extract hostname */
obj = xmlXPathEval(BAD_CAST "string(/domain/container/network/hostname[1])", ctxt);
if ((obj == NULL) || (obj->type != XPATH_STRING) || (obj->stringval == NULL)
if ((obj == NULL) || (obj->type != XPATH_STRING) || (obj->stringval == NULL)
|| (obj->stringval[0] == 0))
openvzLog(OPENVZ_WARN, "No hostname in the given xml config file '%s'", xml->name);
if (strlen((const char *) obj->stringval) >= (OPENVZ_HOSTNAME_MAX - 1)) {
char errorMessage[OPENVZ_MAX_ERROR_LEN];
@ -436,11 +436,11 @@ static struct openvz_vm_def
/* Extract gateway */
obj = xmlXPathEval(BAD_CAST"string(/domain/container/network/gateway[1])", ctxt);
if ((obj == NULL) || (obj->type != XPATH_STRING) || (obj->stringval == NULL)
if ((obj == NULL) || (obj->type != XPATH_STRING) || (obj->stringval == NULL)
|| (obj->stringval[0] == 0))
openvzLog(OPENVZ_WARN, "No Gateway address in the given xml config file '%s'",
openvzLog(OPENVZ_WARN, "No Gateway address in the given xml config file '%s'",
xml->name);
if (strlen((const char *) obj->stringval) >= (OPENVZ_IP_MAX)) {
char errorMessage[OPENVZ_MAX_ERROR_LEN];
@ -453,11 +453,11 @@ static struct openvz_vm_def
/* Extract nameserver */
obj = xmlXPathEval(BAD_CAST "string(/domain/container/network/nameserver[1])", ctxt);
if ((obj == NULL) || (obj->type != XPATH_STRING) || (obj->stringval == NULL)
if ((obj == NULL) || (obj->type != XPATH_STRING) || (obj->stringval == NULL)
|| (obj->stringval[0] == 0))
openvzLog(OPENVZ_WARN, "No Nameserver address inthe given xml config file '%s'",
openvzLog(OPENVZ_WARN, "No Nameserver address inthe given xml config file '%s'",
xml->name);
if (strlen((const char *) obj->stringval) >= (OPENVZ_IP_MAX)) {
char errorMessage[OPENVZ_MAX_ERROR_LEN];
@ -475,7 +475,7 @@ static struct openvz_vm_def
/* Extract profile */
obj = xmlXPathEval(BAD_CAST "string(/domain/container/profile[1])", ctxt);
if ((obj == NULL) || (obj->type != XPATH_STRING) || (obj->stringval == NULL)
if ((obj == NULL) || (obj->type != XPATH_STRING) || (obj->stringval == NULL)
|| (obj->stringval[0] == 0)) {
error(conn, VIR_ERR_INTERNAL_ERROR, NULL);
goto bail_out;
@ -518,19 +518,19 @@ openvzGetVPSInfo(virConnectPtr conn) {
driver = conn->privateData;
driver->num_active = 0;
driver->num_inactive = 0;
if((fp = popen(VZLIST " -a -ovpsid,status -H 2>/dev/null", "r")) == NULL) {
error(conn, VIR_ERR_INTERNAL_ERROR, "popen failed");
return NULL;
}
pnext = &vm;
while(!feof(fp)) {
pnext = &vm;
while(!feof(fp)) {
*pnext = calloc(1, sizeof(**pnext));
if(!*pnext) {
error(conn, VIR_ERR_INTERNAL_ERROR, "calloc failed");
goto error;
}
if(!vm)
vm = *pnext;
@ -540,7 +540,7 @@ openvzGetVPSInfo(virConnectPtr conn) {
free(*pnext);
goto error;
}
if(strcmp(status, "stopped")) {
if(strcmp(status, "stopped")) {
(*pnext)->status = VIR_DOMAIN_RUNNING;
driver->num_active ++;
(*pnext)->vpsid = veid;
@ -552,7 +552,7 @@ openvzGetVPSInfo(virConnectPtr conn) {
* inactive domains don't have their ID set in libvirt,
* thought this doesn't make sense for OpenVZ
*/
(*pnext)->vpsid = -1;
(*pnext)->vpsid = -1;
}
vmdef = calloc(1, sizeof(*vmdef));
@ -561,7 +561,7 @@ openvzGetVPSInfo(virConnectPtr conn) {
free(*pnext);
goto error;
}
snprintf(vmdef->name, OPENVZ_NAME_MAX, "%i", veid);
openvzGetVPSUUID(veid, uuidstr);
ret = virUUIDParse(uuidstr, vmdef->uuid);
@ -590,7 +590,7 @@ error:
return NULL;
}
static char
static char
*openvzLocateConfDir(void)
{
const char *conf_dir_list[] = {"/etc/vz/conf", "/usr/local/etc/conf", NULL};
@ -606,7 +606,7 @@ static char
}
/* Richard Steven's classic readline() function */
int
int
openvz_readline(int fd, char *ptr, int maxlen)
{
int n, rc;
@ -631,7 +631,7 @@ openvz_readline(int fd, char *ptr, int maxlen)
return n;
}
static int
static int
openvzGetVPSUUID(int vpsid, char *uuidstr)
{
char conf_file[PATH_MAX];
@ -672,7 +672,7 @@ openvzGetVPSUUID(int vpsid, char *uuidstr)
* assign if not present.
*/
static int
static int
openvzSetUUID(int vpsid)
{
char conf_file[PATH_MAX];

View File

@ -19,7 +19,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Authors:
* Authors:
* Shuveb Hussain <shuveb@binarykarma.com>
* Anoop Joe Cyriac <anoop@binarykarma.com>
*
@ -111,8 +111,8 @@ openvzIsActiveVM(struct openvz_vm *vm)
}
int openvz_readline(int fd, char *ptr, int maxlen);
struct openvz_vm *openvzFindVMByID(const struct openvz_driver *driver, int id);
struct openvz_vm *openvzFindVMByUUID(const struct openvz_driver *driver,
struct openvz_vm *openvzFindVMByID(const struct openvz_driver *driver, int id);
struct openvz_vm *openvzFindVMByUUID(const struct openvz_driver *driver,
const unsigned char *uuid);
struct openvz_vm *openvzFindVMByName(const struct openvz_driver *driver, const char *name);

View File

@ -19,7 +19,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Authors:
* Authors:
* Shuveb Hussain <shuveb@binarykarma.com>
* Anoop Joe Cyriac <anoop@binarykarma.com>
*
@ -88,7 +88,7 @@ static int openvzReload(void);
static int openvzActive(void);
static virDomainPtr openvzDomainDefineXML(virConnectPtr conn, const char *xml);
static virDomainPtr openvzDomainCreateLinux(virConnectPtr conn, const char *xml,
static virDomainPtr openvzDomainCreateLinux(virConnectPtr conn, const char *xml,
unsigned int flags ATTRIBUTE_UNUSED);
static int openvzDomainUndefine(virDomainPtr dom);
@ -222,7 +222,7 @@ static int openvzDomainGetInfo(virDomainPtr dom,
info->state = vm->status;
/* TODO These need to be calculated differently for OpenVZ */
//info->cpuTime =
//info->cpuTime =
//info->maxMem = vm->def->maxmem;
//info->memory = vm->def->memory;
//info->nrVirtCpu = vm->def->vcpus;
@ -241,30 +241,30 @@ static int openvzDomainShutdown(virDomainPtr dom) {
error(dom->conn, VIR_ERR_INVALID_DOMAIN, "no domain with matching id");
return -1;
}
if (vm->status != VIR_DOMAIN_RUNNING) {
error(dom->conn, VIR_ERR_OPERATION_DENIED, "domain is not in running state");
return -1;
}
snprintf(cmdbuf, CMDBUF_LEN - 1, VZCTL " stop %d ", dom->id);
if((ret = convCmdbufExec(cmdbuf, cmdExec)) == -1)
if((ret = convCmdbufExec(cmdbuf, cmdExec)) == -1)
{
openvzLog(OPENVZ_ERR, "Error in parsing Options to OPENVZ");
goto bail_out;
}
}
ret = virExec(dom->conn, (char **)cmdExec, &pid, -1, &outfd, &errfd);
if(ret == -1) {
error(dom->conn, VIR_ERR_INTERNAL_ERROR, "Could not exec " VZLIST);
return -1;
}
vm->vpsid = -1;
vm->status = VIR_DOMAIN_SHUTOFF;
ovz_driver.num_inactive ++;
ovz_driver.num_active --;
bail_out:
cmdExecFree(cmdExec);
@ -284,14 +284,14 @@ static int openvzDomainReboot(virDomainPtr dom,
error(dom->conn, VIR_ERR_INVALID_DOMAIN, "no domain with matching id");
return -1;
}
if (vm->status != VIR_DOMAIN_RUNNING) {
error(dom->conn, VIR_ERR_OPERATION_DENIED, "domain is not in running state");
return -1;
}
snprintf(cmdbuf, CMDBUF_LEN - 1, VZCTL " restart %d ", dom->id);
if((ret = convCmdbufExec(cmdbuf, cmdExec)) == -1)
if((ret = convCmdbufExec(cmdbuf, cmdExec)) == -1)
{
openvzLog(OPENVZ_ERR, "Error in parsing Options to OPENVZ");
goto bail_out1;
@ -301,10 +301,10 @@ static int openvzDomainReboot(virDomainPtr dom,
error(dom->conn, VIR_ERR_INTERNAL_ERROR, "Could not exec " VZLIST);
return -1;
}
bail_out1:
bail_out1:
cmdExecFree(cmdExec);
return ret;
}
@ -323,7 +323,7 @@ openvzDomainDefineXML(virConnectPtr conn, const char *xml)
vm = openvzFindVMByID(driver, strtoI(vmdef->name));
if (vm) {
openvzLog(OPENVZ_ERR, "Already an OPENVZ VM active with the id '%s'",
openvzLog(OPENVZ_ERR, "Already an OPENVZ VM active with the id '%s'",
vmdef->name);
goto bail_out2;
}
@ -350,7 +350,7 @@ openvzDomainDefineXML(virConnectPtr conn, const char *xml)
strcat(cmdbuf, cmdOption);
}
if((ret = convCmdbufExec(cmdbuf, cmdExec)) == -1)
if((ret = convCmdbufExec(cmdbuf, cmdExec)) == -1)
{
openvzLog(OPENVZ_ERR, "Error in parsing Options to OPENVZ");
goto bail_out2;
@ -360,10 +360,10 @@ openvzDomainDefineXML(virConnectPtr conn, const char *xml)
error(conn, VIR_ERR_INTERNAL_ERROR, "Could not exec " VZLIST);
goto bail_out2;
}
waitpid(pid, NULL, 0);
cmdExecFree(cmdExec);
dom = virGetDomain(conn, vm->vmdef->name, vm->vmdef->uuid);
if (dom)
dom->id = vm->vpsid;
@ -390,7 +390,7 @@ openvzDomainCreateLinux(virConnectPtr conn, const char *xml,
vm = openvzFindVMByID(driver, strtoI(vmdef->name));
if (vm) {
openvzFreeVMDef(vmdef);
openvzLog(OPENVZ_ERR, "Already an OPENVZ VM defined with the id '%d'",
openvzLog(OPENVZ_ERR, "Already an OPENVZ VM defined with the id '%d'",
strtoI(vmdef->name));
return NULL;
}
@ -417,7 +417,7 @@ openvzDomainCreateLinux(virConnectPtr conn, const char *xml,
strcat(cmdbuf, cmdOption);
}
if((ret = convCmdbufExec(cmdbuf, cmdExec)) == -1)
if((ret = convCmdbufExec(cmdbuf, cmdExec)) == -1)
{
openvzLog(OPENVZ_ERR, "Error in parsing Options to OPENVZ");
goto bail_out3;
@ -427,13 +427,13 @@ openvzDomainCreateLinux(virConnectPtr conn, const char *xml,
error(conn, VIR_ERR_INTERNAL_ERROR, "Could not exec " VZLIST);
return NULL;
}
waitpid(pid, NULL, 0);
cmdExecFree(cmdExec);
snprintf(cmdbuf, CMDBUF_LEN - 1, VZCTL " start %s ", vmdef->name);
if((ret = convCmdbufExec(cmdbuf, cmdExec)) == -1)
if((ret = convCmdbufExec(cmdbuf, cmdExec)) == -1)
{
openvzLog(OPENVZ_ERR, "Error in parsing Options to OPENVZ");
goto bail_out3;
@ -443,7 +443,7 @@ openvzDomainCreateLinux(virConnectPtr conn, const char *xml,
error(conn, VIR_ERR_INTERNAL_ERROR, "Could not exec " VZLIST);
return NULL;
}
sscanf(vmdef->name, "%d", &vm->vpsid);
vm->status = VIR_DOMAIN_RUNNING;
ovz_driver.num_inactive--;
@ -457,7 +457,7 @@ openvzDomainCreateLinux(virConnectPtr conn, const char *xml,
dom->id = vm->vpsid;
return dom;
bail_out3:
cmdExecFree(cmdExec);
cmdExecFree(cmdExec);
return NULL;
}
@ -476,7 +476,7 @@ openvzDomainCreate(virDomainPtr dom)
error(dom->conn, VIR_ERR_INVALID_DOMAIN, "no domain with matching id");
return -1;
}
if (vm->status != VIR_DOMAIN_SHUTOFF) {
error(dom->conn, VIR_ERR_OPERATION_DENIED, "domain is not in shutoff state");
return -1;
@ -484,8 +484,8 @@ openvzDomainCreate(virDomainPtr dom)
vmdef = vm->vmdef;
snprintf(cmdbuf, CMDBUF_LEN - 1, VZCTL " start %s ", vmdef->name);
if((ret = convCmdbufExec(cmdbuf, cmdExec)) == -1)
if((ret = convCmdbufExec(cmdbuf, cmdExec)) == -1)
{
openvzLog(OPENVZ_ERR, "Error in parsing Options to OPENVZ");
goto bail_out4;
@ -495,14 +495,14 @@ openvzDomainCreate(virDomainPtr dom)
error(dom->conn, VIR_ERR_INTERNAL_ERROR, "Could not exec " VZLIST);
return -1;
}
sscanf(vmdef->name, "%d", &vm->vpsid);
sscanf(vmdef->name, "%d", &vm->vpsid);
vm->status = VIR_DOMAIN_RUNNING;
ovz_driver.num_inactive --;
ovz_driver.num_active ++;
waitpid(pid, NULL, 0);
bail_out4:
bail_out4:
cmdExecFree(cmdExec);
return ret;
@ -527,8 +527,8 @@ openvzDomainUndefine(virDomainPtr dom)
return -1;
}
snprintf(cmdbuf, CMDBUF_LEN - 1, VZCTL " destroy %s ", vm->vmdef->name);
if((ret = convCmdbufExec(cmdbuf, cmdExec)) == -1)
if((ret = convCmdbufExec(cmdbuf, cmdExec)) == -1)
{
openvzLog(OPENVZ_ERR, "Error in parsing Options to OPENVZ");
goto bail_out5;
@ -538,10 +538,10 @@ openvzDomainUndefine(virDomainPtr dom)
error(conn, VIR_ERR_INTERNAL_ERROR, "Could not exec " VZLIST);
return -1;
}
waitpid(pid, NULL, 0);
openvzRemoveInactiveVM(driver, vm);
bail_out5:
bail_out5:
cmdExecFree(cmdExec);
return ret;
}
@ -580,7 +580,7 @@ static virDrvOpenStatus openvzOpen(virConnectPtr conn,
};
static int openvzClose(virConnectPtr conn) {
struct openvz_driver *driver = (struct openvz_driver *)conn->privateData;
struct openvz_vm *vm = driver->vms;
@ -594,7 +594,7 @@ static int openvzClose(virConnectPtr conn) {
vm = vm->next;
free(prev);
}
conn->privateData = NULL;
return 0;
@ -666,12 +666,12 @@ static int openvzListDefinedDomains(virConnectPtr conn,
}
static int openvzNumDefinedDomains(virConnectPtr conn ATTRIBUTE_UNUSED) {
return ovz_driver.num_inactive;
return ovz_driver.num_inactive;
}
static int openvzStartup(void) {
openvzAssignUUIDs();
return 0;
}

View File

@ -19,7 +19,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Authors:
* Authors:
* Shuveb Hussain <shuveb@binarykarma.com>
* Anoop Joe Cyriac <anoop@binarykarma.com>
*

View File

@ -132,7 +132,7 @@ virProxyError(virConnectPtr conn, virErrorNumber error, const char *info)
* virProxyFindServerPath:
*
* Tries to find the path to the gam_server binary.
*
*
* Returns path on success or NULL in case of error.
*/
static const char *
@ -241,7 +241,7 @@ retry:
}
/*
* Abstract socket do not hit the filesystem, way more secure and
* Abstract socket do not hit the filesystem, way more secure and
* garanteed to be atomic
*/
memset(&addr, 0, sizeof(addr));
@ -295,7 +295,7 @@ virProxyCloseClientSocket(int fd) {
/**
* virProxyReadClientSocket:
* @fd: the socket
* @fd: the socket
* @buffer: the target memory area
* @len: the lenght in bytes
* @quiet: quiet access
@ -332,7 +332,7 @@ retry:
/**
* virProxyWriteClientSocket:
* @fd: the socket
* @fd: the socket
* @data: the data
* @len: the lenght of data in bytes
*
@ -402,7 +402,7 @@ xenProxyClose(virConnectPtr conn)
return 0;
}
static int
static int
xenProxyCommand(virConnectPtr conn, virProxyPacketPtr request,
virProxyFullPacketPtr answer, int quiet) {
static int serial = 0;
@ -533,7 +533,7 @@ xenProxyOpen(virConnectPtr conn,
int ret;
int fd;
xenUnifiedPrivatePtr priv;
if (!(flags & VIR_CONNECT_RO))
return(-1);
@ -922,7 +922,7 @@ xenProxyLookupByName(virConnectPtr conn, const char *name)
* xenProxyNodeGetInfo:
* @conn: pointer to the Xen Daemon block
* @info: pointer to a virNodeInfo structure allocated by the user
*
*
* Extract hardware information about the node.
*
* Returns 0 in case of success and -1 in case of failure.
@ -963,7 +963,7 @@ xenProxyNodeGetInfo(virConnectPtr conn, virNodeInfoPtr info) {
/**
* xenProxyGetCapabilities:
* @conn: pointer to the Xen Daemon block
*
*
* Extract capabilities of the hypervisor.
*
* Returns capabilities in case of success (freed by caller)
@ -1016,7 +1016,7 @@ xenProxyGetCapabilities (virConnectPtr conn)
*
* This method generates an XML description of a domain.
*
* Returns the XML document on success, NULL otherwise.
* Returns the XML document on success, NULL otherwise.
*/
char *
xenProxyDomainDumpXML(virDomainPtr domain, int flags ATTRIBUTE_UNUSED)

View File

@ -60,7 +60,7 @@ typedef struct _virProxyPacket virProxyPacket;
typedef virProxyPacket *virProxyPacketPtr;
/*
* If there is extra data sent from the proxy to the client,
* If there is extra data sent from the proxy to the client,
* they are appended after the packet.
* the size may not be fixed, it's passed as len and includes the
* extra data.

View File

@ -38,11 +38,11 @@
# The default TLS configuration only uses certificates for the server
# allowing the client to verify the server's identity and establish
# and encrypted channel.
# and encrypted channel.
#
# It is possible to use x509 certificates for authentication too, by
# issuing a x509 certificate to every client who needs to connect.
#
#
# Enabling this option will reject any client who does not have a
# certificate signed by the CA in /etc/pki/libvirt-vnc/ca-cert.pem
#

View File

@ -260,7 +260,7 @@ static const struct qemu_feature_flags const arch_info_x86_64_flags [] = {
};
/* The archicture tables for supported QEMU archs */
const struct qemu_arch_info const qemudArchs[] = {
const struct qemu_arch_info const qemudArchs[] = {
/* i686 must be in position 0 */
{ "i686", 32, arch_info_x86_machines, "qemu", arch_info_i686_flags },
/* x86_64 must be in position 1 */
@ -483,13 +483,13 @@ static int qemudParseDiskXML(virConnectPtr conn,
}
device = xmlGetProp(node, BAD_CAST "device");
cur = node->children;
while (cur != NULL) {
if (cur->type == XML_ELEMENT_NODE) {
if ((source == NULL) &&
(xmlStrEqual(cur->name, BAD_CAST "source"))) {
if (typ == QEMUD_DISK_FILE)
source = xmlGetProp(cur, BAD_CAST "file");
else
@ -520,7 +520,7 @@ static int qemudParseDiskXML(virConnectPtr conn,
qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR, "Invalid floppy device name: %s", target);
goto error;
}
if (device &&
!strcmp((const char *)device, "cdrom") &&
strcmp((const char *)target, "hdc")) {
@ -2642,7 +2642,7 @@ int qemudScanConfigDir(struct qemud_driver *driver,
}
closedir(dir);
return 0;
}

View File

@ -298,7 +298,7 @@ qemudShutdown(void) {
qemudRemoveInactiveVM(qemu_driver, vm);
vm = next;
}
/* free inactive VMs */
vm = qemu_driver->vms;
while (vm) {
@ -318,7 +318,7 @@ qemudShutdown(void) {
qemudShutdownNetworkDaemon(NULL, qemu_driver, network);
network = next;
}
/* free inactive networks */
network = qemu_driver->networks;
while (network) {
@ -1406,7 +1406,7 @@ static virDrvOpenStatus qemudOpen(virConnectPtr conn,
} else { /* root */
if (STRNEQ (uri->path, "/system") &&
STRNEQ (uri->path, "/session"))
goto decline;
goto decline;
}
conn->privateData = qemu_driver;
@ -1414,7 +1414,7 @@ static virDrvOpenStatus qemudOpen(virConnectPtr conn,
return VIR_DRV_OPEN_SUCCESS;
decline:
return VIR_DRV_OPEN_DECLINED;
return VIR_DRV_OPEN_DECLINED;
}
static int qemudClose(virConnectPtr conn) {
@ -2166,7 +2166,7 @@ static int qemudDomainRestore(virConnectPtr conn,
if (header.version > QEMUD_SAVE_VERSION) {
qemudReportError(conn, NULL, NULL, VIR_ERR_OPERATION_FAILED,
"image version is not supported (%d > %d)",
"image version is not supported (%d > %d)",
header.version, QEMUD_SAVE_VERSION);
close(fd);
return -1;

View File

@ -166,7 +166,7 @@ remoteStartup(void)
* remoteFindServerPath:
*
* Tries to find the path to the libvirtd binary.
*
*
* Returns path on success or NULL in case of error.
*/
static const char *
@ -544,12 +544,12 @@ doRemoteOpen (virConnectPtr conn,
if (flags & VIR_DRV_OPEN_REMOTE_USER) {
struct passwd *pw;
uid_t uid = getuid();
if (!(pw = getpwuid(uid))) {
error (conn, VIR_ERR_SYSTEM_ERROR, strerror (errno));
goto failed;
}
if (asprintf (&sockname, "@%s" LIBVIRTD_USER_UNIX_SOCKET, pw->pw_dir) < 0) {
error (conn, VIR_ERR_SYSTEM_ERROR, strerror (errno));
goto failed;
@ -932,7 +932,7 @@ negotiate_gnutls_on_connection (virConnectPtr conn,
int err;
gnutls_session_t session;
/* Initialize TLS session
/* Initialize TLS session
*/
err = gnutls_init (&session, GNUTLS_CLIENT);
if (err) {
@ -1023,7 +1023,7 @@ verify_certificate (virConnectPtr conn ATTRIBUTE_UNUSED,
error (conn, VIR_ERR_GNUTLS_ERROR, gnutls_strerror (ret));
return -1;
}
if ((now = time(NULL)) == ((time_t)-1)) {
error (conn, VIR_ERR_SYSTEM_ERROR, strerror (errno));
return -1;
@ -1034,10 +1034,10 @@ verify_certificate (virConnectPtr conn ATTRIBUTE_UNUSED,
if (status & GNUTLS_CERT_INVALID)
reason = "The certificate is not trusted.";
if (status & GNUTLS_CERT_SIGNER_NOT_FOUND)
reason = "The certificate hasn't got a known issuer.";
if (status & GNUTLS_CERT_REVOKED)
reason = "The certificate has been revoked.";
@ -1045,7 +1045,7 @@ verify_certificate (virConnectPtr conn ATTRIBUTE_UNUSED,
if (status & GNUTLS_CERT_INSECURE_ALGORITHM)
reason = "The certificate uses an insecure algorithm";
#endif
error (conn, VIR_ERR_RPC, reason);
return -1;
}
@ -1054,12 +1054,12 @@ verify_certificate (virConnectPtr conn ATTRIBUTE_UNUSED,
error (conn, VIR_ERR_RPC, _("Certificate type is not X.509"));
return -1;
}
if (!(certs = gnutls_certificate_get_peers(session, &nCerts))) {
error (conn, VIR_ERR_RPC, _("gnutls_certificate_get_peers failed"));
return -1;
}
for (i = 0 ; i < nCerts ; i++) {
gnutls_x509_crt_t cert;
@ -1068,26 +1068,26 @@ verify_certificate (virConnectPtr conn ATTRIBUTE_UNUSED,
error (conn, VIR_ERR_GNUTLS_ERROR, gnutls_strerror (ret));
return -1;
}
ret = gnutls_x509_crt_import (cert, &certs[i], GNUTLS_X509_FMT_DER);
if (ret < 0) {
error (conn, VIR_ERR_GNUTLS_ERROR, gnutls_strerror (ret));
gnutls_x509_crt_deinit (cert);
return -1;
}
if (gnutls_x509_crt_get_expiration_time (cert) < now) {
error (conn, VIR_ERR_RPC, _("The certificate has expired"));
gnutls_x509_crt_deinit (cert);
return -1;
}
if (gnutls_x509_crt_get_activation_time (cert) > now) {
error (conn, VIR_ERR_RPC, _("The certificate is not yet activated"));
gnutls_x509_crt_deinit (cert);
return -1;
}
if (i == 0) {
if (!gnutls_x509_crt_check_hostname (cert, priv->hostname)) {
__virRaiseError

View File

@ -501,7 +501,7 @@ sexpr_lookup(const struct sexpr *sexpr, const char *node)
* NB, even if the key was found sexpr_lookup may return NULL if
* the corresponding value was empty
*
* Returns true if the key was found, false otherwise
* Returns true if the key was found, false otherwise
*/
int
sexpr_has(struct sexpr *sexpr, const char *node)

View File

@ -50,7 +50,7 @@
#define virLog(msg...) fprintf(stderr, msg)
static void
static void
ReportError(virConnectPtr conn,
virDomainPtr dom,
virNetworkPtr net,
@ -124,11 +124,11 @@ _virExec(virConnectPtr conn,
close(pipeout[1]);
if(non_block)
if(virSetNonBlock(pipeout[0]) == -1)
ReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
ReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
"Failed to set non-blocking file descriptor flag");
if(virSetCloseExec(pipeout[0]) == -1)
ReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
ReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
"Failed to set close-on-exec file descriptor flag");
*outfd = pipeout[0];
}
@ -136,11 +136,11 @@ _virExec(virConnectPtr conn,
close(pipeerr[1]);
if(non_block)
if(virSetNonBlock(pipeerr[0]) == -1)
ReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
ReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
"Failed to set non-blocking file descriptor flag");
if(virSetCloseExec(pipeerr[0]) == -1)
ReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
ReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
"Failed to set close-on-exec file descriptor flag");
*errfd = pipeerr[0];
}
@ -280,7 +280,7 @@ virExecNonBlock(virConnectPtr conn,
int saferead(int fd, void *buf, size_t count)
{
size_t nread = 0;
while (count > 0) {
while (count > 0) {
int r = read(fd, buf, count);
if (r < 0 && errno == EINTR)
continue;

View File

@ -1136,7 +1136,7 @@ cmdSchedinfo(vshControl * ctl, vshCmd * cmd)
strncpy(params[inputparams].field,str_weight,sizeof(str_weight));
params[inputparams].type = VIR_DOMAIN_SCHED_FIELD_UINT;
params[inputparams].value.ui = weight;
inputparams++;
inputparams++;
}
if (capfound) {

View File

@ -101,7 +101,7 @@ virCopyLastError(virErrorPtr to)
/**
* virResetError:
* @err: pointer to the virError to clean up
*
*
* Reset the error being pointed to
*/
void
@ -118,7 +118,7 @@ virResetError(virErrorPtr err)
/**
* virResetLastError:
*
*
* Reset the last error caught at the library level.
*/
void

View File

@ -1355,7 +1355,7 @@ xenHypervisorSetSchedulerParameters(virDomainPtr domain,
return -1;
}
}
return 0;
}
@ -1658,7 +1658,7 @@ virXen_setvcpumap(int handle, int id, unsigned int vcpu,
if (maplen < 8) {
new = calloc(1, sizeof(uint64_t));
if (!new) {
virXenErrorFunc(NULL, VIR_ERR_NO_MEMORY, __FUNCTION__,
virXenErrorFunc(NULL, VIR_ERR_NO_MEMORY, __FUNCTION__,
"allocating private data", 0);
return (-1);
}
@ -2764,7 +2764,7 @@ xenHypervisorGetDomMaxMemory(virConnectPtr conn, int id)
if (kb_per_pages == 0) {
kb_per_pages = sysconf(_SC_PAGESIZE) / 1024;
if (kb_per_pages <= 0)
if (kb_per_pages <= 0)
kb_per_pages = 4;
}
@ -2825,7 +2825,7 @@ xenHypervisorGetDomInfo(virConnectPtr conn, int id, virDomainInfoPtr info)
if (kb_per_pages == 0) {
kb_per_pages = sysconf(_SC_PAGESIZE) / 1024;
if (kb_per_pages <= 0)
if (kb_per_pages <= 0)
kb_per_pages = 4;
}
@ -2920,15 +2920,15 @@ xenHypervisorGetDomainInfo(virDomainPtr domain, virDomainInfoPtr info)
* xenHypervisorNodeGetCellsFreeMemory:
* @conn: pointer to the hypervisor connection
* @freeMems: pointer to the array of unsigned long long
* @startCell: index of first cell to return freeMems info on.
* @maxCells: Maximum number of cells for which freeMems information can
* @startCell: index of first cell to return freeMems info on.
* @maxCells: Maximum number of cells for which freeMems information can
* be returned.
*
* This call returns the amount of free memory in one or more NUMA cells.
* The @freeMems array must be allocated by the caller and will be filled
* with the amount of free memory in kilobytes for each cell requested,
* starting with startCell (in freeMems[0]), up to either
* (startCell + maxCells), or the number of additional cells in the node,
* with the amount of free memory in kilobytes for each cell requested,
* starting with startCell (in freeMems[0]), up to either
* (startCell + maxCells), or the number of additional cells in the node,
* whichever is smaller.
*
* Returns the number of entries filled in freeMems, or -1 in case of error.
@ -2941,7 +2941,7 @@ xenHypervisorNodeGetCellsFreeMemory(virConnectPtr conn, unsigned long long *free
int i, j, ret;
xenUnifiedPrivatePtr priv;
int nbNodeCells;
if (conn == NULL) {
virXenErrorFunc (conn, VIR_ERR_INVALID_ARG, __FUNCTION__,
"invalid argument", 0);

View File

@ -80,8 +80,8 @@ xenUnifiedError (virConnectPtr conn, virErrorNumber error, const char *info)
/*
* Helper functions currently used in the NUMA code
* Those variables should not be accessed directly but through helper
* functions xenNbCells() and xenNbCpu() available to all Xen backends
* Those variables should not be accessed directly but through helper
* functions xenNbCells() and xenNbCpu() available to all Xen backends
*/
static int nbNodeCells = -1;
static int nbNodeCpus = -1;
@ -190,9 +190,9 @@ xenDomainUsedCpus(virDomainPtr dom)
cpulist[m] = 1;
nb++;
/* if all CPU are used just return NULL */
if (nb == nb_cpu)
if (nb == nb_cpu)
goto done;
}
}
}
@ -914,7 +914,7 @@ xenUnifiedDomainDumpXML (virDomainPtr dom, int flags)
}
if (priv->opened[XEN_UNIFIED_PROXY_OFFSET])
return xenProxyDomainDumpXML(dom, flags);
}
}
xenUnifiedError (dom->conn, VIR_ERR_NO_SUPPORT, __FUNCTION__);
return NULL;
@ -1087,7 +1087,7 @@ xenUnifiedDomainGetSchedulerType (virDomainPtr dom, int *nparams)
if (priv->opened[i] && drivers[i]->domainGetSchedulerType) {
schedulertype = drivers[i]->domainGetSchedulerType (dom, nparams);
if (schedulertype != NULL)
return(schedulertype);
return(schedulertype);
}
}
return(NULL);
@ -1161,7 +1161,7 @@ xenUnifiedNodeGetCellsFreeMemory (virConnectPtr conn, unsigned long long *freeMe
GET_PRIVATE (conn);
if (priv->opened[XEN_UNIFIED_HYPERVISOR_OFFSET])
return xenHypervisorNodeGetCellsFreeMemory (conn, freeMems,
return xenHypervisorNodeGetCellsFreeMemory (conn, freeMems,
startCell, maxCells);
xenUnifiedError (conn, VIR_ERR_NO_SUPPORT, __FUNCTION__);
@ -1176,7 +1176,7 @@ xenUnifiedNodeGetFreeMemory (virConnectPtr conn)
GET_PRIVATE (conn);
if (priv->opened[XEN_UNIFIED_HYPERVISOR_OFFSET]) {
ret = xenHypervisorNodeGetCellsFreeMemory (conn, &freeMem,
ret = xenHypervisorNodeGetCellsFreeMemory (conn, &freeMem,
-1, 1);
if (ret != 1)
return (0);

View File

@ -883,7 +883,7 @@ xenDaemonOpen_unix(virConnectPtr conn, const char *path)
* xenDaemonOpen_tcp:
* @conn: an existing virtual connection block
* @host: the host name for the Xen Daemon
* @port: the port
* @port: the port
*
* Creates a possibly remote Xen Daemon connection
* Note: this doesn't try to check if the connection actually works
@ -1160,9 +1160,9 @@ xend_detect_config_version(virConnectPtr conn) {
root = sexpr_get(conn, "/xend/node/");
if (root == NULL)
return (-1);
value = sexpr_node(root, "node/xend_config_format");
if (value) {
priv->xendConfigVersion = strtol(value, NULL, 10);
} else {
@ -1270,7 +1270,7 @@ xend_log(virConnectPtr xend, char *buffer, size_t n_buffer)
* @xend: the xend connection object
* @node: the root of the parsed S-Expression
* @buf: output buffer object
* @hvm: true or 1 if no contains HVM S-Expression
* @hvm: true or 1 if no contains HVM S-Expression
* @bootloader: true or 1 if a bootloader is defined
*
* Parse the xend sexp for description of os and append it to buf.
@ -1289,7 +1289,7 @@ xend_parse_sexp_desc_os(virConnectPtr xend, struct sexpr *node, virBufferPtr buf
if (node == NULL || buf == NULL) {
return(-1);
}
virBufferAddLit(buf, " <os>\n");
if (hvm)
virBufferAddLit(buf, " <type>hvm</type>\n");
@ -1466,7 +1466,7 @@ xend_parse_sexp_desc(virConnectPtr conn, struct sexpr *root,
if ((cur_mem >= MIN_XEN_GUEST_SIZE) && (cur_mem != max_mem))
virBufferVSprintf(&buf, " <currentMemory>%d</currentMemory>\n",
cur_mem);
virBufferVSprintf(&buf, " <vcpu");
if (cpus != NULL) {
virBufferVSprintf(&buf, " cpuset='%s'", cpus);
@ -1961,7 +1961,7 @@ sexpr_to_xend_node_info(const struct sexpr *root, virNodeInfoPtr info)
*
* Returns 0 in case of success, -1 in case of error
*/
static int
static int
sexpr_to_xend_topology_xml(virConnectPtr conn, const struct sexpr *root,
virBufferPtr xml)
{
@ -1996,11 +1996,11 @@ sexpr_to_xend_topology_xml(virConnectPtr conn, const struct sexpr *root,
</topology>\n");
if (r < 0) goto vir_buffer_failed;
return (0);
vir_buffer_failed:
virXendError(conn, VIR_ERR_NO_MEMORY, _("allocate new buffer"));
error:
return (-1);
}
@ -2348,7 +2348,7 @@ xenDaemonDomainSave(virDomainPtr domain, const char *filename)
__FUNCTION__);
return(-1);
}
/* We can't save the state of Domain-0, that would mean stopping it too */
if (domain->id == 0) {
@ -2689,7 +2689,7 @@ error:
* xenDaemonNodeGetInfo:
* @conn: pointer to the Xen Daemon block
* @info: pointer to a virNodeInfo structure allocated by the user
*
*
* Extract hardware information about the node.
*
* Returns 0 in case of success and -1 in case of failure.
@ -2767,7 +2767,7 @@ xenDaemonGetVersion(virConnectPtr conn, unsigned long *hvVer)
struct sexpr *root;
int major, minor;
unsigned long version;
if (!VIR_IS_CONNECT(conn)) {
virXendError(conn, VIR_ERR_INVALID_CONN, __FUNCTION__);
return (-1);
@ -2937,7 +2937,7 @@ xenDaemonDomainSetVcpus(virDomainPtr domain, unsigned int vcpus)
* @vcpu: virtual CPU number
* @cpumap: pointer to a bit map of real CPUs (in 8-bit bytes)
* @maplen: length of cpumap in bytes
*
*
* Dynamically change the real CPUs which can be allocated to a virtual CPU.
*
* Returns 0 for success; -1 (with errno) on error
@ -2983,7 +2983,7 @@ xenDaemonDomainPinVcpu(virDomainPtr domain, unsigned int vcpu,
* One cpumap inside cpumaps has the format described in virDomainPinVcpu() API.
* @maplen: number of bytes in one cpumap, from 1 up to size of CPU map in
* underlying virtualization system (Xen...).
*
*
* Extract information about virtual CPUs of domain, store it in info array
* and also in cpumaps if this pointer is'nt NULL.
*
@ -3142,7 +3142,7 @@ xenDaemonLookupByUUID(virConnectPtr conn, const unsigned char *uuid)
* Launch a new Linux guest domain, based on an XML description similar
* to the one returned by virDomainGetXMLDesc()
* This function may requires priviledged access to the hypervisor.
*
*
* Returns a new domain object or NULL in case of failure
*/
static virDomainPtr
@ -3211,7 +3211,7 @@ xenDaemonCreateLinux(virConnectPtr conn, const char *xmlDesc,
* xenDaemonAttachDevice:
* @domain: pointer to domain object
* @xml: pointer to XML description of device
*
*
* Create a virtual device attachment to backend.
* XML description is translated into S-expression.
*
@ -3256,10 +3256,10 @@ xenDaemonAttachDevice(virDomainPtr domain, const char *xml)
/* device doesn't exist, define it */
ret = xend_op(domain->conn, domain->name, "op", "device_create",
"config", conf, NULL);
}
}
else {
/* device exists, attempt to modify it */
ret = xend_op(domain->conn, domain->name, "op", "device_configure",
ret = xend_op(domain->conn, domain->name, "op", "device_configure",
"config", conf, "dev", ref, NULL);
}
free(sexpr);
@ -3270,7 +3270,7 @@ xenDaemonAttachDevice(virDomainPtr domain, const char *xml)
* xenDaemonDetachDevice:
* @domain: pointer to domain object
* @xml: pointer to XML description of device
*
*
* Destroy a virtual device attachment to backend.
*
* Returns 0 in case of success, -1 in case of failure.

View File

@ -31,7 +31,7 @@ extern "C" {
* \param host The host name to connect to
* \param port The port number to connect to
* \return 0 in case of success, -1 in case of error
*
*
* This method creates a new Xend instance via TCP.
*
* This function may not fail if Xend is not running.
@ -44,7 +44,7 @@ int xenDaemonOpen_tcp(virConnectPtr xend, const char *host, int port);
* \brief Setup the connection to xend instance via a Unix domain socket
* \param path The path to the domain socket
* \return 0 in case of success, -1 in case of error
*
*
* This method creates a new xend instance via a Unix domain socket.
*
* This function may not fail if Xend is not running.
@ -59,7 +59,7 @@ int xenDaemonOpen_unix(virConnectPtr xend, const char *path);
* \param xend A xend instance
* \param name The domain's name
* \return 0 for success; -1 (with errno) on error
*
*
* xen_create() returns after a domain has been allocated including
* its memory. This does not guarentee, though, that the devices
* have come up properly. For instance, if you create a VBD with an

View File

@ -2334,7 +2334,7 @@ virDomainPtr xenXMDomainDefineXML(virConnectPtr conn, const char *xml) {
xenXMError(conn, VIR_ERR_INTERNAL_ERROR, "uuid config parameter is missing");
goto error;
}
if (!(olddomain = virGetDomain(conn, value->str, uuid)))
goto error;

View File

@ -302,7 +302,7 @@ virParseCpuSet(virConnectPtr conn, const char **str, char sep,
* virParseXenCpuTopology:
* @conn: connection
* @xml: XML output buffer
* @str: the topology string
* @str: the topology string
* @maxcpu: number of elements available in @cpuset
*
* Parse a Xend CPU topology string and build the associated XML
@ -436,7 +436,7 @@ virConvertCpuSet(virConnectPtr conn, const char *str, int maxcpu) {
virXMLError(conn, VIR_ERR_NO_MEMORY, _("allocate buffer"), 0);
return(NULL);
}
ret = virParseCpuSet(conn, &cur, 0, cpuset, maxcpu);
if (ret < 0) {
free(cpuset);
@ -911,7 +911,7 @@ virDomainParseXMLOSDescHVM(virConnectPtr conn, xmlNodePtr node,
return -1;
}
/*
/*
* Originally XenD abused the 'kernel' parameter for the HVM
* firmware. New XenD allows HVM guests to boot from a kernel
* and if this is enabled, the HVM firmware must use the new
@ -1112,7 +1112,7 @@ virDomainParseXMLOSDescKernel(virConnectPtr conn ATTRIBUTE_UNUSED,
}
cur = cur->next;
}
virBufferVSprintf(buf, "(kernel '%s')", (const char *) kernel);
if (initrd != NULL)
@ -1592,7 +1592,7 @@ virDomainParseXMLDesc(virConnectPtr conn, const char *xmldesc, char **name,
}
}
free(cpuset);
if (res < 0)
if (res < 0)
goto error;
} else {
virXMLError(conn, VIR_ERR_NO_MEMORY, xmldesc, 0);

View File

@ -48,7 +48,7 @@ static void xmlRpcError(virErrorNumber error, const char *info, int value)
static xmlRpcValuePtr xmlRpcValueNew(xmlRpcValueType type)
{
xmlRpcValuePtr ret = malloc(sizeof(*ret));
if (!ret)
xmlRpcError(VIR_ERR_NO_MEMORY, _("allocate value"), sizeof(*ret));
else
@ -95,7 +95,7 @@ static xmlRpcValuePtr xmlRpcValueUnmarshalDateTime(xmlNodePtr node ATTRIBUTE_UNU
static xmlRpcValuePtr xmlRpcValueUnmarshalString(xmlNodePtr node)
{
xmlRpcValuePtr ret = xmlRpcValueNew(XML_RPC_STRING);
if (ret)
ret->value.string = xmlGetText(node);
return ret;
@ -112,7 +112,7 @@ static xmlRpcValuePtr xmlRpcValueUnmarshalInteger(xmlNodePtr node)
{
xmlRpcValuePtr ret = xmlRpcValueNew(XML_RPC_INTEGER);
char *value = xmlGetText(node);
if (ret && value)
ret->value.integer = atoi(value);
free(value);
@ -216,15 +216,15 @@ static xmlRpcValuePtr xmlRpcValueUnmarshalDict(xmlNodePtr node)
if (!ret)
return NULL;
ret->value.dict.root = root;
for (cur = xmlFirstElement(node); cur; cur = xmlNextElement(cur)) {
*elem = xmlRpcValueUnmarshalDictElement(cur);
if (*elem==NULL) {
xmlRpcValueFree(ret);
return NULL;
}
}
elem = &(*elem)->next;
}
@ -353,7 +353,7 @@ void xmlRpcValueMarshal(xmlRpcValuePtr value, virBufferPtr buf, int indent)
TODO
break;
case XML_RPC_STRING:
virBufferStrcat(buf,
virBufferStrcat(buf,
"<string>", value->value.string, "</string>", NULL);
break;
case XML_RPC_NIL:
@ -377,10 +377,10 @@ virBufferPtr xmlRpcMarshalRequest(const char *request,
" <methodName>", request, "</methodName>\n"
" <params>\n", NULL);
for (i = 0; i < argc; i++) {
virBufferStrcat(buf,
virBufferStrcat(buf,
" <param>\n", NULL);
xmlRpcValueMarshal(argv[i], buf, 6);
virBufferStrcat(buf,
virBufferStrcat(buf,
" </param>\n", NULL);
}
virBufferStrcat(buf,
@ -508,7 +508,7 @@ xmlRpcArgvNew(const char *fmt, va_list ap, int *argc)
xmlRpcValuePtr *argv;
const char *ptr;
int i;
*argc = strlen(fmt);
if (!(argv = malloc(sizeof(*argv) * *argc))) {
xmlRpcError(VIR_ERR_NO_MEMORY, _("read response"), sizeof(*argv) * *argc);
@ -573,22 +573,22 @@ int xmlRpcCall(xmlRpcContextPtr context, const char *method,
void *retval = NULL;
va_start(ap, fmt);
if (retfmt && *retfmt)
retval = va_arg(ap, void *);
if (!(argv = xmlRpcArgvNew(fmt, ap, &argc)))
return -1;
va_end(ap);
buf = xmlRpcMarshalRequest(method, argc, argv);
xmlRpcArgvFree(argc, argv);
if (!buf)
return -1;
ret = xmlRpcCallRaw(context->uri, buf->content);
virBufferFree(buf);
@ -644,7 +644,7 @@ int xmlRpcCall(xmlRpcContextPtr context, const char *method,
xmlFreeDoc(xml);
if (fault) {
if (fault) {
/* FIXME we need generic dict routines */
/* FIXME we need faultMessage propagate to libvirt error API */
context->faultCode = value->value.dict.root->value->value.integer;

View File

@ -21,7 +21,7 @@
#include <stdint.h>
#include <xen/dom0_ops.h>
#include <xen/dom0_ops.h>
#include <xen/version.h>
#include <xen/xen.h>
@ -256,7 +256,7 @@ virDomainGetVM(virDomainPtr domain)
* @vm: the xenstore vm path
* @name: the value's path
*
* Internal API extracting one information the device used
* Internal API extracting one information the device used
* by the domain from xensttore
*
* Returns the new string or NULL in case of error
@ -325,7 +325,7 @@ xenStoreOpen(virConnectPtr conn,
* remote) mechanism.
*/
if (getuid() == 0) {
virXenStoreError(NULL, VIR_ERR_NO_XEN,
virXenStoreError(NULL, VIR_ERR_NO_XEN,
_("failed to connect to Xen Store"));
}
return (-1);
@ -662,7 +662,7 @@ xenStoreDomainShutdown(virDomainPtr domain)
if (domain->id == -1 || domain->id == 0)
return(-1);
/*
* this is very hackish, the domU kernel probes for a special
* this is very hackish, the domU kernel probes for a special
* node in the xenstore and launch the shutdown command if found.
*/
return(virDomainDoStoreWrite(domain, "control/shutdown", "halt"));
@ -690,7 +690,7 @@ xenStoreDomainReboot(virDomainPtr domain, unsigned int flags ATTRIBUTE_UNUSED)
if (domain->id == -1 || domain->id == 0)
return(-1);
/*
* this is very hackish, the domU kernel probes for a special
* this is very hackish, the domU kernel probes for a special
* node in the xenstore and launch the shutdown command if found.
*/
return(virDomainDoStoreWrite(domain, "control/shutdown", "reboot"));
@ -731,7 +731,7 @@ xenStoreDomainGetOSType(virDomainPtr domain) {
* @domid: id of the domain
*
* Return the port number on which the domain is listening for VNC
* connections.
* connections.
*
* Returns the port number, -1 in case of error
*/

View File

@ -52,6 +52,6 @@ int main(void) {
virConnectClose(conn);
printf("OK\n");
exit(0);
}

View File

@ -6,7 +6,7 @@ do
./conftest $f > conftest.$$
outfile=`echo "$f" | sed s+\.conf$+\.out+`
diff $outfile conftest.$$ > /dev/null
if [ $? != 0 ]
if [ $? != 0 ]
then
if [ -n "$DEBUG_TESTS" ]; then
diff -u $outfile conftest.$$

View File

@ -17,7 +17,7 @@
extern "C" {
#endif
double virtTestCountAverage(double *items,
int nitems);

View File

@ -283,12 +283,12 @@ main(int argc, char **argv)
buffer[PATH_MAX-1] = '\0';
progname = argv[0];
custom_uri = buffer;
if (argc > 1) {
fprintf(stderr, "Usage: %s\n", progname);
fprintf(stderr, "Usage: %s\n", progname);
exit(EXIT_FAILURE);
}
if (virtTestRun("virsh list (default)",
1, testCompareListDefault, NULL) != 0)
ret = -1;

View File

@ -256,7 +256,7 @@ main(int argc, char **argv)
fprintf(stderr, "missing enviroment variable abs_top_srcdir\n");
exit(EXIT_FAILURE);
}
if (argc > 1) {
fprintf(stderr, "Usage: %s\n", progname);

View File

@ -38,12 +38,12 @@ testMethodPlusINT(const void *data)
{
int retval = 0;
xmlRpcContextPtr cxt = (xmlRpcContextPtr) data;
if (xmlRpcCall(cxt, "plus", "i", "ii",
if (xmlRpcCall(cxt, "plus", "i", "ii",
(const char *) &retval, 10, 10) < 0)
return -1;
return retval==(10+10) ? 0 : -1;
return retval==(10+10) ? 0 : -1;
}
static int
@ -51,12 +51,12 @@ testMethodPlusDOUBLE(const void *data)
{
double retval = 0;
xmlRpcContextPtr cxt = (xmlRpcContextPtr) data;
if (xmlRpcCall(cxt, "plus", "f", "ff",
if (xmlRpcCall(cxt, "plus", "f", "ff",
(const char *) &retval, 10.1234, 10.1234) < 0)
return -1;
return retval==(10.1234+10.1234) ? 0 : -1;
return retval==(10.1234+10.1234) ? 0 : -1;
}
static virBufferPtr
@ -66,11 +66,11 @@ marshalRequest(const char *fmt, ...)
xmlRpcValuePtr *argv;
virBufferPtr buf;
va_list ap;
va_start(ap, fmt);
argv = xmlRpcArgvNew(fmt, ap, &argc);
va_end(ap);
buf = xmlRpcMarshalRequest("test", argc, argv);
xmlRpcArgvFree(argc, argv);
@ -84,32 +84,32 @@ checkRequestValue(const char *xmlstr, const char *xpath, int type, void *expecte
xmlXPathContextPtr ctxt = NULL;
xmlXPathObjectPtr obj = NULL;
int ret = -1;
xml = xmlReadDoc((const xmlChar *) xmlstr, "xmlrpctest.xml", NULL,
XML_PARSE_NOENT | XML_PARSE_NONET |
XML_PARSE_NOERROR | XML_PARSE_NOWARNING);
if (!xml)
goto error;
if (!(ctxt = xmlXPathNewContext(xml)))
goto error;
if (!(obj = xmlXPathEval(BAD_CAST xpath, ctxt)))
goto error;
switch(type) {
case XML_RPC_INTEGER:
if ((obj->type != XPATH_NUMBER) ||
if ((obj->type != XPATH_NUMBER) ||
((int) obj->floatval != *((int *)expected)))
goto error;
break;
case XML_RPC_DOUBLE:
if ((obj->type != XPATH_NUMBER) ||
if ((obj->type != XPATH_NUMBER) ||
((double) obj->floatval != *((double *)expected)))
goto error;
break;
case XML_RPC_STRING:
if ((obj->type != XPATH_STRING) ||
if ((obj->type != XPATH_STRING) ||
(strcmp((const char *)obj->stringval, (const char *)expected)))
goto error;
break;
@ -118,7 +118,7 @@ checkRequestValue(const char *xmlstr, const char *xpath, int type, void *expecte
}
ret = 0;
error:
error:
if (obj)
xmlXPathFreeObject(obj);
xmlXPathFreeContext(ctxt);
@ -136,10 +136,10 @@ testMarshalRequestINT(const void *data)
virBufferPtr buf = marshalRequest("i", num);
if (check)
ret = checkRequestValue(buf->content,
ret = checkRequestValue(buf->content,
"number(/methodCall/params/param[1]/value/int)",
XML_RPC_INTEGER, (void *) &num);
virBufferFree(buf);
return ret;
}
@ -152,8 +152,8 @@ testMarshalRequestSTRING(const void *data ATTRIBUTE_UNUSED)
int check = data ? *((int *)data) : 0;
virBufferPtr buf = marshalRequest("s", str);
if (check)
ret = checkRequestValue(buf->content,
if (check)
ret = checkRequestValue(buf->content,
"string(/methodCall/params/param[1]/value/string)",
XML_RPC_STRING, (void *) str);
virBufferFree(buf);
@ -169,10 +169,10 @@ testMarshalRequestDOUBLE(const void *data)
virBufferPtr buf = marshalRequest("f", num);
if (check)
ret = checkRequestValue(buf->content,
ret = checkRequestValue(buf->content,
"number(/methodCall/params/param[1]/value/double)",
XML_RPC_DOUBLE, (void *) &num);
virBufferFree(buf);
return ret;
}
@ -182,7 +182,7 @@ testBufferStrcat(const void *data ATTRIBUTE_UNUSED)
{
virBufferPtr buf = virBufferNew(1000*32); /* don't waste time with realloc */
int i;
for (i=0; i < 1000; i++)
virBufferStrcat(buf, "My name is ", "libvirt", ".\n", NULL);
@ -195,7 +195,7 @@ testBufferVSprintf(const void *data ATTRIBUTE_UNUSED)
{
virBufferPtr buf = virBufferNew(1000*32); /* don't waste time with realloc */
int i;
for (i=0; i < 1000; i++)
virBufferVSprintf(buf, "My name is %s.\n", "libvirt");
@ -215,14 +215,14 @@ main(int argc, char **argv)
if (argc > 2)
{
fprintf(stderr, "Usage: %s [url]\n", progname);
fprintf(stderr, "Usage: %s [url]\n", progname);
exit(EXIT_FAILURE);
}
if (argc == 2)
url = argv[1];
/*
* client-server tests
/*
* client-server tests
*/
if (!(cxt = xmlRpcContextNew(url)))
{
@ -230,37 +230,37 @@ main(int argc, char **argv)
exit(EXIT_FAILURE);
}
if (virtTestRun("XML-RPC methodCall INT+INT",
if (virtTestRun("XML-RPC methodCall INT+INT",
NLOOPS, testMethodPlusINT, (const void *) cxt) != 0)
ret = -1;
if (virtTestRun("XML-RPC methodCall DOUBLE+DOUBLE",
if (virtTestRun("XML-RPC methodCall DOUBLE+DOUBLE",
NLOOPS, testMethodPlusDOUBLE, (const void *) cxt) != 0)
ret = -1;
xmlRpcContextFree(cxt);
/*
* regression / performance tests
/*
* regression / performance tests
*/
if (virtTestRun("XML-RPC request marshalling: INT (check)",
if (virtTestRun("XML-RPC request marshalling: INT (check)",
1, testMarshalRequestINT, (const void *) &check) != 0)
ret = -1;
if (virtTestRun("XML-RPC request marshalling: INT",
if (virtTestRun("XML-RPC request marshalling: INT",
NLOOPS, testMarshalRequestINT, NULL) != 0)
ret = -1;
if (virtTestRun("XML-RPC request marshalling: DOUBLE (check)",
if (virtTestRun("XML-RPC request marshalling: DOUBLE (check)",
1, testMarshalRequestDOUBLE, (const void *) &check) != 0)
ret = -1;
if (virtTestRun("XML-RPC request marshalling: DOUBLE",
if (virtTestRun("XML-RPC request marshalling: DOUBLE",
NLOOPS, testMarshalRequestDOUBLE, NULL) != 0)
ret = -1;
if (virtTestRun("XML-RPC request marshalling: STRING (check)",
if (virtTestRun("XML-RPC request marshalling: STRING (check)",
1, testMarshalRequestSTRING, (void *) &check) != 0)
ret = -1;
if (virtTestRun("XML-RPC request marshalling: STRING",
if (virtTestRun("XML-RPC request marshalling: STRING",
NLOOPS, testMarshalRequestSTRING, NULL) != 0)
ret = -1;
@ -268,7 +268,7 @@ main(int argc, char **argv)
ret = -1;
if (virtTestRun("Buffer: sprintf", NLOOPS, testBufferVSprintf, NULL) != 0)
ret = -1;
exit(ret==0 ? EXIT_SUCCESS : EXIT_FAILURE);
}

42
virsh.1
View File

@ -188,15 +188,15 @@ This prints a small synopsis about all commands available for \fBvirsh\fR
quit this interactive terminal
.IP "\fBversion\fR" 4
.IX Item "version"
Will print out the major version info about what this built from.
Will print out the major version info about what this built from.
.RS 4
.Sp
.RS 4
\&\fBExample\fR
\&\fBExample\fR
.Sp
\&\fBvirsh\fR version
\&\fBvirsh\fR version
.Sp
Compiled against library: libvir 0.0.6
Compiled against library: libvir 0.0.6
.Sp
Using library: libvir 0.0.6
.Sp
@ -250,20 +250,20 @@ specified it prints out information about all domains.
An example format for the list is as follows:
.Sp
\&\fBvirsh\fR list
Id Name State
Id Name State
.Sp
\&\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
\&\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
.Sp
.Vb 2
\& 0 Domain-0 running
\& 0 Domain-0 running
\& 2 fedora paused
.Ve
.Sp
Name is the name of the domain. \s-1ID\s0 the domain numeric id.
State is the run state (see below).
Name is the name of the domain. \s-1ID\s0 the domain numeric id.
State is the run state (see below).
.IP "\fBfreecell\fR optional \fIcellno\fR" 4
.IX Item "freecell optional cellno"
Prints the available amount of memory on the machine or within a
Prints the available amount of memory on the machine or within a
\&\s-1NUMA\s0 cell if \fIcellno\fR is provided.
.RS 4
.Sp
@ -290,7 +290,7 @@ scheduling by the Xen hypervisor.
.IP "\fBs \- shutdown\fR" 4
.IX Item "s - shutdown"
The domain is in the process of shutting down, i.e. the guest operating system
has been notified and should be in the process of stopping its operations
has been notified and should be in the process of stopping its operations
gracefully.
.IP "\fBc \- crashed\fR" 4
.IX Item "c - crashed"
@ -318,11 +318,11 @@ The option \fI\-\-disable\fR disable autostarting.
Connect the virtual serial console for the guest.
.IP "\fBcreate\fR \fI\s-1FILE\s0\fR" 4
.IX Item "create FILE"
Create a domain from an \s-1XML\s0 <file> an easy way to create one if you have a pre-existing xen guest created via \fBxm\fR create <\s-1XMLFILE\s0>.
Create a domain from an \s-1XML\s0 <file> an easy way to create one if you have a pre-existing xen guest created via \fBxm\fR create <\s-1XMLFILE\s0>.
.Sp
\&\fBExample\fR
.Sp
virsh dumpxml <domain\-id> > file.
virsh dumpxml <domain\-id> > file.
.IP "\fBdefine\fR \fI\s-1FILE\s0\fR" 4
.IX Item "define FILE"
Define a domain from an \s-1XML\s0 <file>. The domain definitions is registered
@ -353,7 +353,7 @@ convert a domain Id to domain name
Returns state about a running domain.
.IP "\fBdumpxml\fR \fIdomain-id\fR" 4
.IX Item "dumpxml domain-id"
Output the domain informations as an \s-1XML\s0 dump to stdout, this format can be used by the \fBcreate\fR command.
Output the domain informations as an \s-1XML\s0 dump to stdout, this format can be used by the \fBcreate\fR command.
.IP "\fBreboot\fR \fIdomain-id\fR" 4
.IX Item "reboot domain-id"
Reboot a domain. This acts just as if the domain had the \fBreboot\fR
@ -385,19 +385,19 @@ kilobytes.
.IP "\fBsetmaxmem\fR \fIdomain-id\fR \fBkilobytes\fR" 4
.IX Item "setmaxmem domain-id kilobytes"
Change the maximum memory allocation limit in the guest domain. This should
not change the current memory use. The memory limit is specified in
not change the current memory use. The memory limit is specified in
kilobytes.
.IP "\fBsetvcpus\fR \fIdomain-id\fR \fIcount\fR" 4
.IX Item "setvcpus domain-id count"
Change the number of virtual CPUs active in the guest domain. Note that
\&\fIcount\fR may be limited by host, hypervisor or limit coming from the
\&\fIcount\fR may be limited by host, hypervisor or limit coming from the
original description of domain.
.IP "\fBshutdown\fR \fIdomain-id\fR" 4
.IX Item "shutdown domain-id"
Gracefully shuts down a domain. This coordinates with the domain \s-1OS\s0
to perform graceful shutdown, so there is no guarantee that it will
succeed, and may take a variable length of time depending on what
services must be shutdown in the domain.
services must be shutdown in the domain.
.Sp
For a xen guest vm the behavior of what happens to a domain when it reboots is set by the
\&\fIon_shutdown\fR parameter of the xmdomain.cfg file when the domain was
@ -491,7 +491,7 @@ The \fI\-\-disable\fR option disable autostarting.
.IP "\fBnet-create\fR \fIfile\fR" 4
.IX Item "net-create file"
Create a virtual network from an \s-1XML\s0 \fIfile\fR, see the documentation to get
a description of the \s-1XML\s0 network format used by libvirt.
a description of the \s-1XML\s0 network format used by libvirt.
.IP "\fBnet-define\fR \fIfile\fR" 4
.IX Item "net-define file"
Define a virtual network from an \s-1XML\s0 \fIfile\fR, the network is just defined but
@ -536,18 +536,18 @@ format as accepted by the \fBconnect\fR option.
.SH "AUTHOR"
.IX Header "AUTHOR"
.Vb 2
\& Andrew Puch <apuch @ redhat.com>
\& Andrew Puch <apuch @ redhat.com>
\& Daniel Veillard <veillard @ redhat.com>
.Ve
.Sp
.Vb 3
\& Based on the xm man paged by
\& Based on the xm man paged by
\& Sean Dague <sean at dague dot net>
\& Daniel Stekloff <dsteklof at us dot ibm dot com>
.Ve
.SH "BUGS"
.IX Header "BUGS"
Bugs can be view on the RedHat buzilla page under the libvirt
Bugs can be view on the RedHat buzilla page under the libvirt
<https://bugzilla.redhat.com/>
.Sp
<https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr>