Re: [PATCH 02/12] Split driver.h into multiple parts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/22/2014 11:14 AM, Daniel P. Berrange wrote:
> With the large number of APIs in libvirt the driver.h file,
> it is easy to get lost looking for things. Split each driver
> into a separate header file based on the functional driver
> groups.

Someday, I'd also like to see the public .h headers get split, where
libvirt.h merely pulls in all the subsidiary public .h headers. But
that's a separate patch series, and this one is nice to have now.

> 
> Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
> ---
>  src/driver-hypervisor.h | 1396 ++++++++++++++++++++++++++++++
>  src/driver-interface.h  |  131 +++
>  src/driver-network.h    |  166 ++++
>  src/driver-nodedev.h    |  112 +++
>  src/driver-nwfilter.h   |   94 ++
>  src/driver-secret.h     |  114 +++
>  src/driver-state.h      |   58 ++
>  src/driver-storage.h    |  265 ++++++
>  src/driver-stream.h     |   72 ++
>  src/driver.h            | 2170 +----------------------------------------------

Big.  I reviewed this for sanity that the bulk of it is code motion from
driver.h to driver-hypervisor.h:

$ diff -u <(sed -n 's/^-//p'  patch) \
          <(sed -n 's/^\+//p' patch)

but because the other files are also part of the same diff, but the
sorting of the filenames is different than the order of the sections in
driver.h, even the filtered patch got pretty ugly to read.

If I were doing it from scratch, it might have been easier to submit
multiple patches, one per .h creation (because the above formula shows a
MUCH smaller diff when it is not intermixing files).  But it's not worth
you respinning the series just for that.

That said, I'm a huge fan of this split, and since it still compiles,
you appear to have done it correctly.  ACK, and let's get it in sooner
rather than later to minimize the time you have to carry it around in
rebases.

> -
> -/*
> - * Registration
> - * TODO: also need ways to (des)activate a given driver
> - *       lookup based on the URI given in a virConnectOpen(ReadOnly)

I also noticed that you nuked this TODO (including it's spelling error
of "desactivate") rather than moving it somewhere.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]