[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] directory hierarchy
From: |
Anthony Liguori |
Subject: |
Re: [Qemu-devel] directory hierarchy |
Date: |
Sun, 16 Sep 2012 09:40:40 -0500 |
User-agent: |
Notmuch/0.13.2+93~ged93d79 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) |
Paolo Bonzini <address@hidden> writes:
> Il 14/09/2012 15:36, Peter Maydell ha scritto:
>> On 14 September 2012 14:17, Paolo Bonzini <address@hidden> wrote:
>>> here is a proposal for moving around 150 C files currently in the
>>> toplevel directory to separate, well-delimited subdirectories.
>>
>> No general objection (though some specific comments below). However
>> I think it would be helpful if you could provide some descriptions of
>> how your new subdirectories are defined. Otherwise the "well-delimited"
>> bit is largely in your head and future new files aren't likely to
>> respect it except by accident :-)
>
> Good question. I just tried to use some taste, so well-delimited is a
> bit of a lie. I mostly care that sysemu/, tools/, qga/ and user/ are
> well-delimited, i.e. executables do not have sources from other
> executables' directories, and similarly common/ is just for emulators.
>
>>> Header
>>> files would be moved for now in include/, preparing for subsequent
>>> reorganization of headers.
>>
>> Just in include/, or in include/qemu/ ? (IIRC Anthony was hoping
>> to only move cleaned-up headers in there?)
>
> I dislike include/qemu, for the same reason I dislike qemu-*. :)
It's good to put includes in a single direction such that you can do
-Iinclude and then:
#include "qemu/foo.h"
Which is better than:
#include "foo.h"
Because the later can create confusion/conflict with system headers
whereas the former is (hopefully) completely unambiguous.
> Moving to include/ would be to clean up the top-level directory, withour
> touching the source code. If something can be moved directly to one of
> the new source directories, that's also fine but I don't have high
> hopes.
I actually thinking moving to -Iinclude is a Good Thing for now because
it avoids touching a bunch of .c files. In the longer term, we should
continue to clean up headers and move them into qemu/ though.
Regards,
Anthony Liguori
- [Qemu-devel] directory hierarchy, Paolo Bonzini, 2012/09/14
- Re: [Qemu-devel] directory hierarchy, Luiz Capitulino, 2012/09/14
- Re: [Qemu-devel] directory hierarchy, Daniel P. Berrange, 2012/09/14
- Re: [Qemu-devel] directory hierarchy, Peter Maydell, 2012/09/14
- Re: [Qemu-devel] directory hierarchy, Stefan Weil, 2012/09/14