[libvirt] [PATCH] Fix documentation and comment typos
by Paolo Bonzini
Fix a few mispellings :-) of "successfully" and regenerate
docs/libvirt-*.xml. The regeneration also includes the changes
in 47c8709.
* src/libvirt.c: Fix typos.
* src/secret/secret_driver.c: Fix typos.
* docs/libvirt-api.xml: Regenerate.
* docs/libvirt-refs.xml: Regenerate.
---
docs/libvirt-api.xml | 6 +++---
docs/libvirt-refs.xml | 10 +++-------
src/libvirt.c | 4 ++--
src/secret/secret_driver.c | 4 ++--
4 files changed, 10 insertions(+), 14 deletions(-)
diff --git a/docs/libvirt-api.xml b/docs/libvirt-api.xml
index 795701c..88dc246 100644
--- a/docs/libvirt-api.xml
+++ b/docs/libvirt-api.xml
@@ -2847,7 +2847,7 @@ API looks like
...report an error...
virStreamFree(st);
close(fd);]]></info>
- <return type='int' info='0 if all the data was succesfully received. The caller should invoke virStreamFinish(st) to flush the stream upon success and then virStreamFree Returns -1 upon any error, with virStreamAbort() already having been called, so the caller need only call virStreamFree()'/>
+ <return type='int' info='0 if all the data was successfully received. The caller should invoke virStreamFinish(st) to flush the stream upon success and then virStreamFree Returns -1 upon any error, with virStreamAbort() already having been called, so the caller need only call virStreamFree()'/>
<arg name='stream' type='virStreamPtr' info='pointer to the stream object'/>
<arg name='handler' type='virStreamSinkFunc' info='sink callback for writing data to application'/>
<arg name='opaque' type='void *' info='application defined data'/>
@@ -2864,7 +2864,7 @@ the caller no longer needs the reference to this object.]]></info>
<info><![CDATA[Write a series of bytes to the stream. This method may
block the calling application for an arbitrary amount
of time. Once an application has finished sending data
-it should call virStreamFinish to wait for succesful
+it should call virStreamFinish to wait for successful
confirmation from the driver, or detect any error
This method may not be used if a stream source has been
@@ -2939,7 +2939,7 @@ API looks like
...report an error...
virStreamFree(st);
close(fd);]]></info>
- <return type='int' info='0 if all the data was succesfully sent. The caller should invoke virStreamFinish(st) to flush the stream upon success and then virStreamFree Returns -1 upon any error, with virStreamAbort() already having been called, so the caller need only call virStreamFree()'/>
+ <return type='int' info='0 if all the data was successfully sent. The caller should invoke virStreamFinish(st) to flush the stream upon success and then virStreamFree Returns -1 upon any error, with virStreamAbort() already having been called, so the caller need only call virStreamFree()'/>
<arg name='stream' type='virStreamPtr' info='pointer to the stream object'/>
<arg name='handler' type='virStreamSourceFunc' info='source callback for reading data from application'/>
<arg name='opaque' type='void *' info='application defined data'/>
diff --git a/docs/libvirt-refs.xml b/docs/libvirt-refs.xml
index 428f847..08034e4 100644
--- a/docs/libvirt-refs.xml
+++ b/docs/libvirt-refs.xml
@@ -7176,21 +7176,17 @@
<ref name='virNetworkCreate'/>
<ref name='virStreamEventUpdateCallback'/>
</word>
- <word name='succesful'>
- <ref name='virStreamSend'/>
- </word>
- <word name='succesfully'>
- <ref name='virStreamRecvAll'/>
- <ref name='virStreamSendAll'/>
- </word>
<word name='successful'>
<ref name='virDomainMigrate'/>
<ref name='virDomainSave'/>
<ref name='virNodeDeviceCreateXML'/>
+ <ref name='virStreamSend'/>
</word>
<word name='successfully'>
<ref name='virConnectOpen'/>
<ref name='virStreamFinish'/>
+ <ref name='virStreamRecvAll'/>
+ <ref name='virStreamSendAll'/>
</word>
<word name='such'>
<ref name='virConnCopyLastError'/>
diff --git a/src/libvirt.c b/src/libvirt.c
index 4cc19ec..dacf8c4 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -9638,7 +9638,7 @@ error:
* virStreamFree(st);
* close(fd);
*
- * Returns 0 if all the data was succesfully sent. The caller
+ * Returns 0 if all the data was successfully sent. The caller
* should invoke virStreamFinish(st) to flush the stream upon
* success and then virStreamFree
*
@@ -9735,7 +9735,7 @@ cleanup:
* virStreamFree(st);
* close(fd);
*
- * Returns 0 if all the data was succesfully received. The caller
+ * Returns 0 if all the data was successfully received. The caller
* should invoke virStreamFinish(st) to flush the stream upon
* success and then virStreamFree
*
diff --git a/src/secret/secret_driver.c b/src/secret/secret_driver.c
index 9c4102e..d61c24a 100644
--- a/src/secret/secret_driver.c
+++ b/src/secret/secret_driver.c
@@ -751,7 +751,7 @@ secretDefineXML(virConnectPtr conn, const char *xml,
if (secretDeleteSaved(conn, driver, secret) < 0)
goto restore_backup;
}
- /* Saved succesfully - drop old values */
+ /* Saved successfully - drop old values */
new_attrs = NULL;
virSecretDefFree(backup);
@@ -843,7 +843,7 @@ secretSetValue(virSecretPtr obj, const unsigned char *value,
if (secretSaveValue(obj->conn, driver, secret) < 0)
goto restore_backup;
}
- /* Saved succesfully - drop old value */
+ /* Saved successfully - drop old value */
if (old_value != NULL) {
memset(old_value, 0, old_value_size);
VIR_FREE(old_value);
--
1.6.2.5
15 years, 6 months
[libvirt] [PATCH] Allows for a <description> tag for domains
by Daniel Veillard
https://bugzilla.redhat.com/show_bug.cgi?id=523639
feature request which makes sense to me, the simple patch attached
seems to be sufficient, one can define and have the description back
in the dump. Doesn't try to keep the location of the tag, it always
get serialized after <uuid>.
The only drawbacks I can think of are:
- others XML formats may require the same, but honnestly it's trivial
- machine generated description (for example if the history log of
a domain gets stored there) could grow a lot and I wonder if we
have a hard limit on the size when transmitting xml descriptions
Oh and I didn't found a good place to test the feature, i.e. no test
seems to parse and reserialize XML it's always about conversions.
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel(a)veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
15 years, 6 months
[libvirt] [PATCH] Avoid a libvirtd crash on broken input 523418
by Daniel Veillard
A simple typo in an XML domain file could lead to a crash, because
we called STRPREFIX() on the looked up value without checking it was
non-null. Patch is trivial, and should go in but I wonder if we
shouldn't make those STR macros safer too like turning
#define STRPREFIX(a,b) (strncmp((a),(b),strlen((b))) == 0)
into
#define STRPREFIX(a,b) ((a) && (b) && (strncmp((a),(b),strlen((b))) == 0))
anyway I think we should apply the patch independently, without it
libvirtd crash, with it we get the proper error report:
[root@paphio ~]# virsh define RHEL-5.4-64.xml
18:32:21.982: warning : processCallDispatchReply:7570 : Method call
error
error: Failed to define domain from RHEL-5.4-64.xml
error: internal error No <source> 'dev' attribute specified with
<interface type='bridge'/>
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel(a)veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
15 years, 6 months
[libvirt] [PATCH] Fix USB device re-labelling
by Mark McLoughlin
A simple misplaced break out of a switch results in:
libvir: error : Failed to open file '/sys/bus/pci/devices/0000:00:54c./vendor': No such file or directory
libvir: error : Failed to open file '/sys/bus/pci/devices/0000:00:54c./device': No such file or directory
libvir: error : this function is not supported by the hypervisor: Failed to read product/vendor ID for 0000:00:54c.
when trying to passthrough a USB host device to qemu.
* src/security_selinux.c: fix a switch/break thinko
---
src/security/security_selinux.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c
index bdd9eb2..d08d502 100644
--- a/src/security/security_selinux.c
+++ b/src/security/security_selinux.c
@@ -492,12 +492,11 @@ SELinuxSetSecurityHostdevLabel(virConnectPtr conn,
ret = usbDeviceFileIterate(conn, usb, SELinuxSetSecurityUSBLabel, vm);
usbFreeDevice(conn, usb);
-
- break;
} else {
/* XXX deal with product/vendor better */
ret = 0;
}
+ break;
}
case VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI: {
--
1.6.2.5
15 years, 6 months
[libvirt] [OT] Relocation lookup
by Rakotomandimby Mihamina
Hi all,
Given the Social and Political reality in my country (Madagascar),
I am obliged to look for a relocation.
This is my public profile:
http://www.linkedin.com/in/mihaminarakotomandimby
Would you be aware of a position I could fit in?
Thank you.
--
Architecte Informatique chez Blueline/Gulfsat:
Administration Systeme, Recherche & Developpement
+261 34 29 155 34
15 years, 6 months