]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Clarify behavior or virDomainDetachDevice
authorJán Tomko <jtomko@redhat.com>
Fri, 20 Feb 2015 11:25:42 +0000 (12:25 +0100)
committerJán Tomko <jtomko@redhat.com>
Wed, 25 Feb 2015 09:06:41 +0000 (10:06 +0100)
Document that a complete device definition should be used
and a partial match can lead to the device being detached.

https://bugzilla.redhat.com/show_bug.cgi?id=872028

src/libvirt-domain.c
tools/virsh.pod

index 492e90af0eb22d2335d6af3027cf56df4530a534..89d1eab17203255fe9e90f3a216fa1984338342e 100644 (file)
@@ -8266,6 +8266,13 @@ virDomainAttachDeviceFlags(virDomainPtr domain,
  * into S4 state (also known as hibernation) unless you also modify the
  * persistent domain definition.
  *
+ * The supplied XML description of the device should be as specific
+ * as its definition in the domain XML. The set of attributes used
+ * to match the device are internal to the drivers. Using a partial definition,
+ * or attempting to detach a device that is not present in the domain XML,
+ * but shares some specific attributes with one that is present,
+ * may lead to unexpected results.
+ *
  * Returns 0 in case of success, -1 in case of failure.
  */
 int
@@ -8341,6 +8348,13 @@ virDomainDetachDevice(virDomainPtr domain, const char *xml)
  * into S4 state (also known as hibernation) unless you also modify the
  * persistent domain definition.
  *
+ * The supplied XML description of the device should be as specific
+ * as its definition in the domain XML. The set of attributes used
+ * to match the device are internal to the drivers. Using a partial definition,
+ * or attempting to detach a device that is not present in the domain XML,
+ * but shares some specific attributes with one that is present,
+ * may lead to unexpected results.
+ *
  * Returns 0 in case of success, -1 in case of failure.
  */
 int
index a7e0bb02933c4f279ddcd31296d6982585d27c79..343f26f2beceafd151b8c7d2224c8baa55e58ea7 100644 (file)
@@ -2439,9 +2439,12 @@ as command B<attach-device>.
 For passthrough host devices, see also B<nodedev-reattach>, needed if
 the device does not use managed mode.
 
-B<Note>: using of partial device definition XML files may lead to unexpected
-results as some fields may be autogenerated and thus match devices other than
-expected.
+B<Note>: The supplied XML description of the device should be as specific
+as its definition in the domain XML. The set of attributes used
+to match the device are internal to the drivers. Using a partial definition,
+or attempting to detach a device that is not present in the domain XML,
+but shares some specific attributes with one that is present,
+may lead to unexpected results.
 
 If I<--live> is specified, affect a running domain.
 If I<--config> is specified, affect the next startup of a persistent domain.