<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div class="gmail-HOEnZb"><div class="gmail-h5"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">+int qemuDomainAttachDeviceLiveAndConfig(virConnectPtr conn,<br>
+                                        virDomainObjPtr vm,<br>
+                                        virQEMUDriverPtr driver,<br>
+                                        const char *xml,<br>
+                                        unsigned int flags);<br>
+<br>
+int qemuDomainDetachDeviceLiveAndConfig(virQEMUDriverPtr driver,<br>
+                                        virDomainObjPtr vm,<br>
+                                        const char *xml,<br>
+                                        unsigned int flags);<br>
+<br>
#endif /* __QEMU_DRIVER_H__ */<br>
</blockquote>
<br></div></div>
This should not be exposed in qemu_driver.h, instead the functions<br>
should be moved to qemu_domain.h if possible, but they now fit there.<br>
<br>
If that's not possible, we need to do similar thing as we now have with<br>
qemu_processpriv.h, so this could be called qemu_domainpriv.h I guess</blockquote><div>Did you mean qemu_driverpriv.h?</div><div><br></div><div><br></div><div><div><div>As you predicted, it's not easily done.</div><div><br></div><div>qemuDomainAttachDeviceLiveAndConfig() indirectly uses a few functions</div><div>from qemu_hotplug. It would be pointless to move them all to</div><div>qemu_domain.h, because then we would have to drag the whole qemu_hotplug.[hc]</div><div>along.</div><div><br></div><div><br></div><div>What can be done is moving these to qemu_hotplug.h:</div><div>- qemuDomainAttachDeviceLive()</div><div>- qemuDomainDetachDeviceLive(),</div><div><br></div><div>and these to qemu_domain.h: </div><div>- qemuDomainAttachDeviceConfig()</div><div>- qemuDomainDetachDeviceConfig()</div><div>- qemuDomainChrPreInsert()</div><div>- qemuDomainChrInsertPreAlloced()</div><div>- qemuDomainChrInsertPreAllocCleanup()</div><div>- qemuDomainChrInsert()</div><div>- qemuDomainChrRemove().</div><div><br></div><div>But then where should qemuDomainAttachDeviceLiveAndConfig() and</div><div>qemuDomainDetachDeviceLiveAndConfig() be? In that</div><div>qemu_domainpriv/qemu_driverpriv.h? And should their definitions</div><div>still be in qemu_driver.c, or in a brand new .c file?</div><div><br></div><div><br></div><div>Btw qemuDomainUpdateDeviceFlags() is still unsplit and it deserves</div><div>the same treatment as the other two *DeviceFlags functions. It will</div><div>be done in v3.</div><div><br></div></div><div><br></div><div>Thank you again for such thorough reviews! I really appreciate it.</div><div>Tomasz</div></div></div></div></div>