<div dir="ltr"><div><div><div><div><div><div><div><div><div><br></div>Hello,<br><br></div>I am applying for the project idea "Rewriting Virtual-Box Driver" suggested by Michal Privoznik(<a href="mailto:mprivozn@redhat.com">mprivozn@redhat.com</a>) in the "Qemu" ideas page (<a href="http://wiki.qemu.org/Google_Summer_of_Code_2014">http://wiki.qemu.org/Google_Summer_of_Code_2014</a>). <br>
<br>In the short span of time that I had after my discussion with Mr. Privoznik, the current Virtual Box driver code is not structured very well(lot of #ifdef's in the current code) and very hard to read. <br><br>Since libvirt has to support all versions of Virtual Box, the current code decides on what code to compile based on the value of the macro <br>
VBOX_API_VERSION <br><br>that is checked during ./configure. <br><br></div>The only thing after discussion that we were able to come up with is putting <br></div>version specific code under particular files and only compile the those necessary <br>
</div>files during "make"<br><br></div>For instance, <br>if a function X() supports version A, B, C we will have function X() in vbox_A.c just for version A, function X() in vbox_B.c just for version B and so on.<br>
<br></div>Any other suggestions than the above mentioned one which <br>can be used to fix the problem??<br><br></div>Regards,<br></div>Prashanth Sunder<br></div>